@azure/arm-onlineexperimentation 1.0.0-alpha.20250619.1 → 1.0.0-alpha.20250722.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 (87) hide show
  1. package/dist/browser/api/onlineExperimentationContext.js +16 -10
  2. package/dist/browser/api/onlineExperimentationContext.js.map +1 -1
  3. package/dist/browser/api/onlineExperimentationWorkspaces/operations.js +58 -24
  4. package/dist/browser/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  5. package/dist/browser/api/operations/operations.js +8 -3
  6. package/dist/browser/api/operations/operations.js.map +1 -1
  7. package/dist/browser/classic/onlineExperimentationWorkspaces/index.js +3 -1
  8. package/dist/browser/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  9. package/dist/browser/classic/operations/index.js +3 -1
  10. package/dist/browser/classic/operations/index.js.map +1 -1
  11. package/dist/browser/onlineExperimentationClient.js +12 -3
  12. package/dist/browser/onlineExperimentationClient.js.map +1 -1
  13. package/dist/browser/restorePollerHelpers.js +11 -13
  14. package/dist/browser/restorePollerHelpers.js.map +1 -1
  15. package/dist/browser/static-helpers/pagingHelpers.js +31 -50
  16. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
  17. package/dist/browser/static-helpers/pollingHelpers.js +14 -11
  18. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
  19. package/dist/browser/static-helpers/urlTemplate.js +3 -3
  20. package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
  21. package/dist/commonjs/api/onlineExperimentationContext.js +16 -10
  22. package/dist/commonjs/api/onlineExperimentationContext.js.map +1 -1
  23. package/dist/commonjs/api/onlineExperimentationWorkspaces/operations.js +58 -24
  24. package/dist/commonjs/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  25. package/dist/commonjs/api/operations/operations.js +8 -3
  26. package/dist/commonjs/api/operations/operations.js.map +1 -1
  27. package/dist/commonjs/classic/onlineExperimentationWorkspaces/index.js +3 -1
  28. package/dist/commonjs/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  29. package/dist/commonjs/classic/operations/index.js +3 -1
  30. package/dist/commonjs/classic/operations/index.js.map +1 -1
  31. package/dist/commonjs/onlineExperimentationClient.js +12 -3
  32. package/dist/commonjs/onlineExperimentationClient.js.map +1 -1
  33. package/dist/commonjs/restorePollerHelpers.js +11 -13
  34. package/dist/commonjs/restorePollerHelpers.js.map +1 -1
  35. package/dist/commonjs/static-helpers/pagingHelpers.js +31 -50
  36. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
  37. package/dist/commonjs/static-helpers/pollingHelpers.js +14 -11
  38. package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
  39. package/dist/commonjs/static-helpers/urlTemplate.js +3 -3
  40. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
  41. package/dist/commonjs/tsdoc-metadata.json +11 -11
  42. package/dist/esm/api/onlineExperimentationContext.js +16 -10
  43. package/dist/esm/api/onlineExperimentationContext.js.map +1 -1
  44. package/dist/esm/api/onlineExperimentationWorkspaces/operations.js +58 -24
  45. package/dist/esm/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  46. package/dist/esm/api/operations/operations.js +8 -3
  47. package/dist/esm/api/operations/operations.js.map +1 -1
  48. package/dist/esm/classic/onlineExperimentationWorkspaces/index.js +3 -1
  49. package/dist/esm/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  50. package/dist/esm/classic/operations/index.js +3 -1
  51. package/dist/esm/classic/operations/index.js.map +1 -1
  52. package/dist/esm/onlineExperimentationClient.js +12 -3
  53. package/dist/esm/onlineExperimentationClient.js.map +1 -1
  54. package/dist/esm/restorePollerHelpers.js +11 -13
  55. package/dist/esm/restorePollerHelpers.js.map +1 -1
  56. package/dist/esm/static-helpers/pagingHelpers.js +31 -50
  57. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
  58. package/dist/esm/static-helpers/pollingHelpers.js +14 -11
  59. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
  60. package/dist/esm/static-helpers/urlTemplate.js +3 -3
  61. package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
  62. package/dist/react-native/api/onlineExperimentationContext.js +16 -10
  63. package/dist/react-native/api/onlineExperimentationContext.js.map +1 -1
  64. package/dist/react-native/api/onlineExperimentationWorkspaces/operations.js +58 -24
  65. package/dist/react-native/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  66. package/dist/react-native/api/operations/operations.js +8 -3
  67. package/dist/react-native/api/operations/operations.js.map +1 -1
  68. package/dist/react-native/classic/onlineExperimentationWorkspaces/index.js +3 -1
  69. package/dist/react-native/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  70. package/dist/react-native/classic/operations/index.js +3 -1
  71. package/dist/react-native/classic/operations/index.js.map +1 -1
  72. package/dist/react-native/onlineExperimentationClient.js +12 -3
  73. package/dist/react-native/onlineExperimentationClient.js.map +1 -1
  74. package/dist/react-native/restorePollerHelpers.js +11 -13
  75. package/dist/react-native/restorePollerHelpers.js.map +1 -1
  76. package/dist/react-native/static-helpers/pagingHelpers.js +31 -50
  77. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
  78. package/dist/react-native/static-helpers/pollingHelpers.js +14 -11
  79. package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
  80. package/dist/react-native/static-helpers/urlTemplate.js +3 -3
  81. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
  82. package/package.json +2 -2
  83. /package/review/{arm-onlineexperimentation-api.api.md → arm-onlineexperimentation-api-node.api.md} +0 -0
  84. /package/review/{arm-onlineexperimentation-api-onlineExperimentationWorkspaces.api.md → arm-onlineexperimentation-api-onlineExperimentationWorkspaces-node.api.md} +0 -0
  85. /package/review/{arm-onlineexperimentation-api-operations.api.md → arm-onlineexperimentation-api-operations-node.api.md} +0 -0
  86. /package/review/{arm-onlineexperimentation-models.api.md → arm-onlineexperimentation-models-node.api.md} +0 -0
  87. /package/review/{arm-onlineexperimentation.api.md → arm-onlineexperimentation-node.api.md} +0 -0
@@ -1,23 +1,26 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { __rest } from "tslib";
4
3
  import { logger } from "../logger.js";
5
4
  import { getClient } from "@azure-rest/core-client";
6
5
  /** Microsoft.OnlineExperimentation Resource Provider management API. */
7
6
  export function createOnlineExperimentation(credential, subscriptionId, options = {}) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h;
9
- const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : "https://management.azure.com";
10
- const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
7
+ const endpointUrl = options.endpoint ?? options.baseUrl ?? "https://management.azure.com";
8
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
11
9
  const userAgentInfo = `azsdk-js-arm-onlineexperimentation/1.0.0-beta.1`;
12
10
  const userAgentPrefix = prefixFromOptions
13
11
  ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
14
12
  : `azsdk-js-api ${userAgentInfo}`;
15
- const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info }, credentials: {
16
- scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [`${endpointUrl}/.default`],
17
- } }), { apiVersion: _ } = _j, updatedOptions = __rest(_j, ["apiVersion"]);
13
+ const { apiVersion: _, ...updatedOptions } = {
14
+ ...options,
15
+ userAgentOptions: { userAgentPrefix },
16
+ loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },
17
+ credentials: {
18
+ scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],
19
+ },
20
+ };
18
21
  const clientContext = getClient(endpointUrl, credential, updatedOptions);
19
22
  clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" });
20
- const apiVersion = (_h = options.apiVersion) !== null && _h !== void 0 ? _h : "2025-05-31-preview";
23
+ const apiVersion = options.apiVersion ?? "2025-05-31-preview";
21
24
  clientContext.pipeline.addPolicy({
22
25
  name: "ClientApiVersionPolicy",
23
26
  sendRequest: (req, next) => {
@@ -30,7 +33,10 @@ export function createOnlineExperimentation(credential, subscriptionId, options
30
33
  return next(req);
31
34
  },
32
35
  });
33
- return Object.assign(Object.assign({}, clientContext), { apiVersion,
34
- subscriptionId });
36
+ return {
37
+ ...clientContext,
38
+ apiVersion,
39
+ subscriptionId,
40
+ };
35
41
  }
36
42
  //# sourceMappingURL=onlineExperimentationContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onlineExperimentationContext.js","sourceRoot":"","sources":["../../../src/api/onlineExperimentationContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAmB3E,wEAAwE;AACxE,MAAM,UAAU,2BAA2B,CACzC,UAA2B,EAC3B,cAAsB,EACtB,UAAqD,EAAE;;IAEvD,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,CAAC;IAC1F,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,iDAAiD,CAAC;IACxE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,qCACD,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE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AC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\n/** Microsoft.OnlineExperimentation Resource Provider management API. */\nexport interface OnlineExperimentationContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n}\n\n/** Optional parameters for the client. */\nexport interface OnlineExperimentationClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Microsoft.OnlineExperimentation Resource Provider management API. */\nexport function createOnlineExperimentation(\n credential: TokenCredential,\n subscriptionId: string,\n options: OnlineExperimentationClientOptionalParams = {},\n): OnlineExperimentationContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-onlineexperimentation/1.0.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-05-31-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return {\n ...clientContext,\n apiVersion,\n subscriptionId,\n } as OnlineExperimentationContext;\n}\n"]}
1
+ {"version":3,"file":"onlineExperimentationContext.js","sourceRoot":"","sources":["../../../src/api/onlineExperimentationContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAmB3E,wEAAwE;AACxE,MAAM,UAAU,2BAA2B,CACzC,UAA2B,EAC3B,cAAsB,EACtB,UAAqD,EAAE;IAEvD,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,8BAA8B,CAAC;IAC1F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,iDAAiD,CAAC;IACxE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC;SACnE;KACF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,oBAAoB,CAAC;IAC9D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO;QACL,GAAG,aAAa;QAChB,UAAU;QACV,cAAc;KACiB,CAAC;AACpC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\n/** Microsoft.OnlineExperimentation Resource Provider management API. */\nexport interface OnlineExperimentationContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n}\n\n/** Optional parameters for the client. */\nexport interface OnlineExperimentationClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Microsoft.OnlineExperimentation Resource Provider management API. */\nexport function createOnlineExperimentation(\n credential: TokenCredential,\n subscriptionId: string,\n options: OnlineExperimentationClientOptionalParams = {},\n): OnlineExperimentationContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-onlineexperimentation/1.0.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-05-31-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return {\n ...clientContext,\n apiVersion,\n subscriptionId,\n } as OnlineExperimentationContext;\n}\n"]}
@@ -8,14 +8,19 @@ import { createRestError, operationOptionsToRequestParameters, } from "@azure-re
8
8
  export function _listBySubscriptionSend(context, options = {
9
9
  requestOptions: {},
10
10
  }) {
11
- var _a, _b;
12
11
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}", {
13
12
  subscriptionId: context.subscriptionId,
14
13
  "api%2Dversion": context.apiVersion,
15
14
  }, {
16
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
15
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
16
+ });
17
+ return context.path(path).get({
18
+ ...operationOptionsToRequestParameters(options),
19
+ headers: {
20
+ accept: "application/json",
21
+ ...options.requestOptions?.headers,
22
+ },
17
23
  });
18
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
19
24
  }
20
25
  export async function _listBySubscriptionDeserialize(result) {
21
26
  const expectedStatuses = ["200"];
@@ -35,15 +40,20 @@ export function listBySubscription(context, options = {
35
40
  export function _listByResourceGroupSend(context, resourceGroupName, options = {
36
41
  requestOptions: {},
37
42
  }) {
38
- var _a, _b;
39
43
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}", {
40
44
  subscriptionId: context.subscriptionId,
41
45
  resourceGroupName: resourceGroupName,
42
46
  "api%2Dversion": context.apiVersion,
43
47
  }, {
44
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
48
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
49
+ });
50
+ return context.path(path).get({
51
+ ...operationOptionsToRequestParameters(options),
52
+ headers: {
53
+ accept: "application/json",
54
+ ...options.requestOptions?.headers,
55
+ },
45
56
  });
46
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
47
57
  }
48
58
  export async function _listByResourceGroupDeserialize(result) {
49
59
  const expectedStatuses = ["200"];
@@ -63,16 +73,21 @@ export function listByResourceGroup(context, resourceGroupName, options = {
63
73
  export function _$deleteSend(context, resourceGroupName, workspaceName, options = {
64
74
  requestOptions: {},
65
75
  }) {
66
- var _a, _b;
67
76
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
68
77
  subscriptionId: context.subscriptionId,
69
78
  resourceGroupName: resourceGroupName,
70
79
  workspaceName: workspaceName,
71
80
  "api%2Dversion": context.apiVersion,
72
81
  }, {
73
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
82
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
83
+ });
84
+ return context.path(path).delete({
85
+ ...operationOptionsToRequestParameters(options),
86
+ headers: {
87
+ accept: "application/json",
88
+ ...options.requestOptions?.headers,
89
+ },
74
90
  });
75
- return context.path(path).delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
76
91
  }
77
92
  export async function _$deleteDeserialize(result) {
78
93
  const expectedStatuses = ["202", "204", "200"];
@@ -93,8 +108,8 @@ export function $delete(context, resourceGroupName, workspaceName, options = {
93
108
  requestOptions: {},
94
109
  }) {
95
110
  return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], {
96
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
97
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
111
+ updateIntervalInMs: options?.updateIntervalInMs,
112
+ abortSignal: options?.abortSignal,
98
113
  getInitialResponse: () => _$deleteSend(context, resourceGroupName, workspaceName, options),
99
114
  resourceLocationConfig: "location",
100
115
  });
@@ -102,16 +117,23 @@ export function $delete(context, resourceGroupName, workspaceName, options = {
102
117
  export function _updateSend(context, resourceGroupName, workspaceName, properties, options = {
103
118
  requestOptions: {},
104
119
  }) {
105
- var _a, _b;
106
120
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
107
121
  subscriptionId: context.subscriptionId,
108
122
  resourceGroupName: resourceGroupName,
109
123
  workspaceName: workspaceName,
110
124
  "api%2Dversion": context.apiVersion,
111
125
  }, {
112
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
126
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
127
+ });
128
+ return context.path(path).patch({
129
+ ...operationOptionsToRequestParameters(options),
130
+ contentType: "application/json",
131
+ headers: {
132
+ accept: "application/json",
133
+ ...options.requestOptions?.headers,
134
+ },
135
+ body: onlineExperimentationWorkspacePatchSerializer(properties),
113
136
  });
114
- return context.path(path).patch(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: onlineExperimentationWorkspacePatchSerializer(properties) }));
115
137
  }
116
138
  export async function _updateDeserialize(result) {
117
139
  const expectedStatuses = ["200", "202"];
@@ -127,8 +149,8 @@ export function update(context, resourceGroupName, workspaceName, properties, op
127
149
  requestOptions: {},
128
150
  }) {
129
151
  return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], {
130
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
131
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
152
+ updateIntervalInMs: options?.updateIntervalInMs,
153
+ abortSignal: options?.abortSignal,
132
154
  getInitialResponse: () => _updateSend(context, resourceGroupName, workspaceName, properties, options),
133
155
  resourceLocationConfig: "location",
134
156
  });
@@ -136,16 +158,23 @@ export function update(context, resourceGroupName, workspaceName, properties, op
136
158
  export function _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options = {
137
159
  requestOptions: {},
138
160
  }) {
139
- var _a, _b;
140
161
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
141
162
  subscriptionId: context.subscriptionId,
142
163
  resourceGroupName: resourceGroupName,
143
164
  workspaceName: workspaceName,
144
165
  "api%2Dversion": context.apiVersion,
145
166
  }, {
146
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
167
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
168
+ });
169
+ return context.path(path).put({
170
+ ...operationOptionsToRequestParameters(options),
171
+ contentType: "application/json",
172
+ headers: {
173
+ accept: "application/json",
174
+ ...options.requestOptions?.headers,
175
+ },
176
+ body: onlineExperimentationWorkspaceSerializer(resource),
147
177
  });
148
- return context.path(path).put(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: onlineExperimentationWorkspaceSerializer(resource) }));
149
178
  }
150
179
  export async function _createOrUpdateDeserialize(result) {
151
180
  const expectedStatuses = ["200", "201"];
@@ -161,8 +190,8 @@ export function createOrUpdate(context, resourceGroupName, workspaceName, resour
161
190
  requestOptions: {},
162
191
  }) {
163
192
  return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], {
164
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
165
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
193
+ updateIntervalInMs: options?.updateIntervalInMs,
194
+ abortSignal: options?.abortSignal,
166
195
  getInitialResponse: () => _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options),
167
196
  resourceLocationConfig: "azure-async-operation",
168
197
  });
@@ -170,16 +199,21 @@ export function createOrUpdate(context, resourceGroupName, workspaceName, resour
170
199
  export function _getSend(context, resourceGroupName, workspaceName, options = {
171
200
  requestOptions: {},
172
201
  }) {
173
- var _a, _b;
174
202
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
175
203
  subscriptionId: context.subscriptionId,
176
204
  resourceGroupName: resourceGroupName,
177
205
  workspaceName: workspaceName,
178
206
  "api%2Dversion": context.apiVersion,
179
207
  }, {
180
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
208
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
209
+ });
210
+ return context.path(path).get({
211
+ ...operationOptionsToRequestParameters(options),
212
+ headers: {
213
+ accept: "application/json",
214
+ ...options.requestOptions?.headers,
215
+ },
181
216
  });
182
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
183
217
  }
184
218
  export async function _getDeserialize(result) {
185
219
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/onlineExperimentationWorkspaces/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,yBAAyB,EAEzB,wCAAwC,EACxC,0CAA0C,EAE1C,6CAA6C,EAE7C,qDAAqD,GACtD,MAAM,wBAAwB,CAAC;AAShC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAGjC,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C;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OnlineExperimentationWorkspace,\n onlineExperimentationWorkspaceSerializer,\n onlineExperimentationWorkspaceDeserializer,\n OnlineExperimentationWorkspacePatch,\n onlineExperimentationWorkspacePatchSerializer,\n _OnlineExperimentationWorkspaceListResult,\n _onlineExperimentationWorkspaceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OnlineExperimentationWorkspaceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in the specified subscription. */\nexport function listBySubscription(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n resourceGroupName: string,\n options: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OnlineExperimentationWorkspaceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in a resource group. */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Deletes an online experimentation workspace. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _$deleteSend(context, resourceGroupName, workspaceName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: onlineExperimentationWorkspacePatchSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Patch an online experimentation workspace. */\nexport function update(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _updateDeserialize, [\"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _updateSend(context, resourceGroupName, workspaceName, properties, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: onlineExperimentationWorkspaceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Create an online experimentation workspace, or update an existing workspace. */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Gets an online experimentation workspace. */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): Promise<OnlineExperimentationWorkspace> {\n const result = await _getSend(context, resourceGroupName, workspaceName, options);\n return _getDeserialize(result);\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/onlineExperimentationWorkspaces/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,yBAAyB,EAEzB,wCAAwC,EACxC,0CAA0C,EAE1C,6CAA6C,EAE7C,qDAAqD,GACtD,MAAM,wBAAwB,CAAC;AAShC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAA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zJ;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,iBAAiB,EAAE,iBAAiB;QACpC,aAAa,EAAE,aAAa;QAC5B,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,0CAA0C,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,gDAAgD;AAChD,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,iBAAyB,EACzB,aAAqB,EACrB,UAA4D;IAC1D,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IAClF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OnlineExperimentationWorkspace,\n onlineExperimentationWorkspaceSerializer,\n onlineExperimentationWorkspaceDeserializer,\n OnlineExperimentationWorkspacePatch,\n onlineExperimentationWorkspacePatchSerializer,\n _OnlineExperimentationWorkspaceListResult,\n _onlineExperimentationWorkspaceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OnlineExperimentationWorkspaceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in the specified subscription. */\nexport function listBySubscription(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n resourceGroupName: string,\n options: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OnlineExperimentationWorkspaceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in a resource group. */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Deletes an online experimentation workspace. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _$deleteSend(context, resourceGroupName, workspaceName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: onlineExperimentationWorkspacePatchSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Patch an online experimentation workspace. */\nexport function update(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _updateDeserialize, [\"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _updateSend(context, resourceGroupName, workspaceName, properties, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: onlineExperimentationWorkspaceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Create an online experimentation workspace, or update an existing workspace. */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Gets an online experimentation workspace. */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): Promise<OnlineExperimentationWorkspace> {\n const result = await _getSend(context, resourceGroupName, workspaceName, options);\n return _getDeserialize(result);\n}\n"]}
@@ -5,13 +5,18 @@ import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"
5
5
  import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
6
6
  import { createRestError, operationOptionsToRequestParameters, } from "@azure-rest/core-client";
7
7
  export function _listSend(context, options = { requestOptions: {} }) {
8
- var _a, _b;
9
8
  const path = expandUrlTemplate("/providers/Microsoft.OnlineExperimentation/operations{?api%2Dversion}", {
10
9
  "api%2Dversion": context.apiVersion,
11
10
  }, {
12
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
11
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
12
+ });
13
+ return context.path(path).get({
14
+ ...operationOptionsToRequestParameters(options),
15
+ headers: {
16
+ accept: "application/json",
17
+ ...options.requestOptions?.headers,
18
+ },
13
19
  });
14
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
15
20
  }
16
21
  export async function _listDeserialize(result) {
17
22
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,gCAAgC,EAEhC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,uEAAuE,EACvE;QACE,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,iCACxB,mCAAmC,CAAC,OAAO,CAAC,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,KAEpC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n _OperationListResult,\n _operationListResultDeserializer,\n Operation,\n errorResponseDeserializer,\n} from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.OnlineExperimentation/operations{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _operationListResultDeserializer(result.body);\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,gCAAgC,EAEhC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,uEAAuE,EACvE;QACE,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n _OperationListResult,\n _operationListResultDeserializer,\n Operation,\n errorResponseDeserializer,\n} from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.OnlineExperimentation/operations{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _operationListResultDeserializer(result.body);\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
@@ -12,6 +12,8 @@ function _getOnlineExperimentationWorkspaces(context) {
12
12
  };
13
13
  }
14
14
  export function _getOnlineExperimentationWorkspacesOperations(context) {
15
- return Object.assign({}, _getOnlineExperimentationWorkspaces(context));
15
+ return {
16
+ ..._getOnlineExperimentationWorkspaces(context),
17
+ };
16
18
  }
17
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/onlineExperimentationWorkspaces/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,cAAc,EACd,GAAG,GACJ,MAAM,yDAAyD,CAAC;AAgDjE,SAAS,mCAAmC,CAAC,OAAqC;IAChF,OAAO;QACL,kBAAkB,EAAE,CAClB,OAAyE,EACzE,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC;QACzC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAA0E,EAC1E,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,OAA6D,EAC7D,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;QAChE,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,UAA+C,EAC/C,OAA6D,EAC7D,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3E,cAAc,EAAE,CACd,iBAAyB,EACzB,aAAqB,EACrB,QAAwC,EACxC,OAAqE,EACrE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC;QACjF,GAAG,EAAE,CACH,iBAAyB,EACzB,aAAqB,EACrB,OAA0D,EAC1D,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6CAA6C,CAC3D,OAAqC;IAErC,yBACK,mCAAmC,CAAC,OAAO,CAAC,EAC/C;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.js\";\nimport {\n OnlineExperimentationWorkspace,\n OnlineExperimentationWorkspacePatch,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"../../api/onlineExperimentationWorkspaces/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/onlineExperimentationWorkspaces/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a OnlineExperimentationWorkspaces operations. */\nexport interface OnlineExperimentationWorkspacesOperations {\n /** Gets all online experimentation workspaces in the specified subscription. */\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Gets all online experimentation workspaces in a resource group. */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Deletes an online experimentation workspace. */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Patch an online experimentation workspace. */\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Create an online experimentation workspace, or update an existing workspace. */\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Gets an online experimentation workspace. */\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => Promise<OnlineExperimentationWorkspace>;\n}\n\nfunction _getOnlineExperimentationWorkspaces(context: OnlineExperimentationContext) {\n return {\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, workspaceName, options),\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => update(context, resourceGroupName, workspaceName, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, workspaceName, resource, options),\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => get(context, resourceGroupName, workspaceName, options),\n };\n}\n\nexport function _getOnlineExperimentationWorkspacesOperations(\n context: OnlineExperimentationContext,\n): OnlineExperimentationWorkspacesOperations {\n return {\n ..._getOnlineExperimentationWorkspaces(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/onlineExperimentationWorkspaces/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,cAAc,EACd,GAAG,GACJ,MAAM,yDAAyD,CAAC;AAgDjE,SAAS,mCAAmC,CAAC,OAAqC;IAChF,OAAO;QACL,kBAAkB,EAAE,CAClB,OAAyE,EACzE,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC;QACzC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAA0E,EAC1E,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,OAA6D,EAC7D,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;QAChE,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,UAA+C,EAC/C,OAA6D,EAC7D,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3E,cAAc,EAAE,CACd,iBAAyB,EACzB,aAAqB,EACrB,QAAwC,EACxC,OAAqE,EACrE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC;QACjF,GAAG,EAAE,CACH,iBAAyB,EACzB,aAAqB,EACrB,OAA0D,EAC1D,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6CAA6C,CAC3D,OAAqC;IAErC,OAAO;QACL,GAAG,mCAAmC,CAAC,OAAO,CAAC;KAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.js\";\nimport {\n OnlineExperimentationWorkspace,\n OnlineExperimentationWorkspacePatch,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"../../api/onlineExperimentationWorkspaces/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/onlineExperimentationWorkspaces/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a OnlineExperimentationWorkspaces operations. */\nexport interface OnlineExperimentationWorkspacesOperations {\n /** Gets all online experimentation workspaces in the specified subscription. */\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Gets all online experimentation workspaces in a resource group. */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Deletes an online experimentation workspace. */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Patch an online experimentation workspace. */\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Create an online experimentation workspace, or update an existing workspace. */\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Gets an online experimentation workspace. */\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => Promise<OnlineExperimentationWorkspace>;\n}\n\nfunction _getOnlineExperimentationWorkspaces(context: OnlineExperimentationContext) {\n return {\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, workspaceName, options),\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => update(context, resourceGroupName, workspaceName, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, workspaceName, resource, options),\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => get(context, resourceGroupName, workspaceName, options),\n };\n}\n\nexport function _getOnlineExperimentationWorkspacesOperations(\n context: OnlineExperimentationContext,\n): OnlineExperimentationWorkspacesOperations {\n return {\n ..._getOnlineExperimentationWorkspaces(context),\n };\n}\n"]}
@@ -7,6 +7,8 @@ function _getOperations(context) {
7
7
  };
8
8
  }
9
9
  export function _getOperationsOperations(context) {
10
- return Object.assign({}, _getOperations(context));
10
+ return {
11
+ ..._getOperations(context),
12
+ };
11
13
  }
12
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAS1D,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAqC;IAErC,yBACK,cAAc,CAAC,OAAO,CAAC,EAC1B;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nfunction _getOperations(context: OnlineExperimentationContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(\n context: OnlineExperimentationContext,\n): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAS1D,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAqC;IAErC,OAAO;QACL,GAAG,cAAc,CAAC,OAAO,CAAC;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nfunction _getOperations(context: OnlineExperimentationContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(\n context: OnlineExperimentationContext,\n): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
@@ -4,17 +4,26 @@ import { createOnlineExperimentation, } from "./api/index.js";
4
4
  import { _getOnlineExperimentationWorkspacesOperations, } from "./classic/onlineExperimentationWorkspaces/index.js";
5
5
  import { _getOperationsOperations } from "./classic/operations/index.js";
6
6
  export class OnlineExperimentationClient {
7
+ _client;
8
+ /** The pipeline used by this client to make requests */
9
+ pipeline;
7
10
  /** Microsoft.OnlineExperimentation Resource Provider management API. */
8
11
  constructor(credential, subscriptionId, options = {}) {
9
- var _a;
10
- const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
12
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
11
13
  const userAgentPrefix = prefixFromOptions
12
14
  ? `${prefixFromOptions} azsdk-js-client`
13
15
  : `azsdk-js-client`;
14
- this._client = createOnlineExperimentation(credential, subscriptionId, Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix } }));
16
+ this._client = createOnlineExperimentation(credential, subscriptionId, {
17
+ ...options,
18
+ userAgentOptions: { userAgentPrefix },
19
+ });
15
20
  this.pipeline = this._client.pipeline;
16
21
  this.onlineExperimentationWorkspaces = _getOnlineExperimentationWorkspacesOperations(this._client);
17
22
  this.operations = _getOperationsOperations(this._client);
18
23
  }
24
+ /** The operation groups for onlineExperimentationWorkspaces */
25
+ onlineExperimentationWorkspaces;
26
+ /** The operation groups for operations */
27
+ operations;
19
28
  }
20
29
  //# sourceMappingURL=onlineExperimentationClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onlineExperimentationClient.js","sourceRoot":"","sources":["../../src/onlineExperimentationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,2BAA2B,GAG5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6CAA6C,GAC9C,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAwB,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAM/F,MAAM,OAAO,2BAA2B;IAKtC,wEAAwE;IACxE,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAqD,EAAE;;QAEvD,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,2BAA2B,CAAC,UAAU,EAAE,cAAc,kCAChE,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,IACrC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,+BAA+B,GAAG,6CAA6C,CAClF,IAAI,CAAC,OAAO,CACb,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createOnlineExperimentation,\n OnlineExperimentationContext,\n OnlineExperimentationClientOptionalParams,\n} from \"./api/index.js\";\nimport {\n OnlineExperimentationWorkspacesOperations,\n _getOnlineExperimentationWorkspacesOperations,\n} from \"./classic/onlineExperimentationWorkspaces/index.js\";\nimport { OperationsOperations, _getOperationsOperations } from \"./classic/operations/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { OnlineExperimentationClientOptionalParams } from \"./api/onlineExperimentationContext.js\";\n\nexport class OnlineExperimentationClient {\n private _client: OnlineExperimentationContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** Microsoft.OnlineExperimentation Resource Provider management API. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: OnlineExperimentationClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createOnlineExperimentation(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.onlineExperimentationWorkspaces = _getOnlineExperimentationWorkspacesOperations(\n this._client,\n );\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for onlineExperimentationWorkspaces */\n public readonly onlineExperimentationWorkspaces: OnlineExperimentationWorkspacesOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
1
+ {"version":3,"file":"onlineExperimentationClient.js","sourceRoot":"","sources":["../../src/onlineExperimentationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,2BAA2B,GAG5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6CAA6C,GAC9C,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAwB,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAM/F,MAAM,OAAO,2BAA2B;IAC9B,OAAO,CAA+B;IAC9C,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,wEAAwE;IACxE,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAqD,EAAE;QAEvD,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,2BAA2B,CAAC,UAAU,EAAE,cAAc,EAAE;YACrE,GAAG,OAAO;YACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;SACtC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,+BAA+B,GAAG,6CAA6C,CAClF,IAAI,CAAC,OAAO,CACb,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,+DAA+D;IAC/C,+BAA+B,CAA4C;IAC3F,0CAA0C;IAC1B,UAAU,CAAuB;CAClD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createOnlineExperimentation,\n OnlineExperimentationContext,\n OnlineExperimentationClientOptionalParams,\n} from \"./api/index.js\";\nimport {\n OnlineExperimentationWorkspacesOperations,\n _getOnlineExperimentationWorkspacesOperations,\n} from \"./classic/onlineExperimentationWorkspaces/index.js\";\nimport { OperationsOperations, _getOperationsOperations } from \"./classic/operations/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { OnlineExperimentationClientOptionalParams } from \"./api/onlineExperimentationContext.js\";\n\nexport class OnlineExperimentationClient {\n private _client: OnlineExperimentationContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** Microsoft.OnlineExperimentation Resource Provider management API. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: OnlineExperimentationClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createOnlineExperimentation(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.onlineExperimentationWorkspaces = _getOnlineExperimentationWorkspacesOperations(\n this._client,\n );\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for onlineExperimentationWorkspaces */\n public readonly onlineExperimentationWorkspaces: OnlineExperimentationWorkspacesOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
@@ -9,21 +9,20 @@ import { deserializeState, } from "@azure/core-lro";
9
9
  * needs to be constructed after the original one is not in scope.
10
10
  */
11
11
  export function restorePoller(client, serializedState, sourceOperation, options) {
12
- var _a, _b, _c;
13
12
  const pollerConfig = deserializeState(serializedState).config;
14
13
  const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
15
14
  if (!initialRequestUrl || !requestMethod) {
16
- throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
15
+ throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
17
16
  }
18
- const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
19
- const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
20
- const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
17
+ const resourceLocationConfig = metadata?.["resourceLocationConfig"];
18
+ const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
19
+ const deserializeHelper = options?.processResponseBody ?? deserializer;
21
20
  if (!deserializeHelper) {
22
- throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
21
+ throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
23
22
  }
24
- return getLongRunningPoller((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
25
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
26
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
23
+ return getLongRunningPoller(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
24
+ updateIntervalInMs: options?.updateIntervalInMs,
25
+ abortSignal: options?.abortSignal,
27
26
  resourceLocationConfig,
28
27
  restoreFrom: serializedState,
29
28
  initialRequestUrl,
@@ -41,7 +40,6 @@ const deserializeMap = {
41
40
  },
42
41
  };
43
42
  function getDeserializationHelper(urlStr, method) {
44
- var _a, _b, _c, _d;
45
43
  const path = new URL(urlStr).pathname;
46
44
  const pathParts = path.split("/");
47
45
  // Traverse list to match the longest candidate
@@ -61,13 +59,13 @@ function getDeserializationHelper(urlStr, method) {
61
59
  // track if we have found a match to return the values found.
62
60
  let found = true;
63
61
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
64
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
65
- const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
62
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
63
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
66
64
  // If the current part of the candidate is a "template" part
67
65
  // Try to use the suffix of pattern to match the path
68
66
  // {guid} ==> $
69
67
  // {guid}:export ==> :export$
70
- const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
68
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
71
69
  if (!isMatched) {
72
70
  found = false;
73
71
  break;