@azure/arm-desktopvirtualization 1.2.2-alpha.20260302.1 → 1.2.2-alpha.20260303.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 (177) hide show
  1. package/dist/commonjs/desktopVirtualizationAPIClient.js +155 -141
  2. package/dist/commonjs/desktopVirtualizationAPIClient.js.map +7 -1
  3. package/dist/commonjs/index.js +28 -19
  4. package/dist/commonjs/index.js.map +7 -1
  5. package/dist/commonjs/models/index.js +269 -379
  6. package/dist/commonjs/models/index.js.map +7 -1
  7. package/dist/commonjs/models/mappers.js +4098 -4000
  8. package/dist/commonjs/models/mappers.js.map +7 -1
  9. package/dist/commonjs/models/parameters.js +449 -391
  10. package/dist/commonjs/models/parameters.js.map +7 -1
  11. package/dist/commonjs/operations/appAttachPackageInfo.js +191 -138
  12. package/dist/commonjs/operations/appAttachPackageInfo.js.map +7 -1
  13. package/dist/commonjs/operations/appAttachPackageOperations.js +376 -321
  14. package/dist/commonjs/operations/appAttachPackageOperations.js.map +7 -1
  15. package/dist/commonjs/operations/applicationGroups.js +382 -327
  16. package/dist/commonjs/operations/applicationGroups.js.map +7 -1
  17. package/dist/commonjs/operations/applications.js +321 -261
  18. package/dist/commonjs/operations/applications.js.map +7 -1
  19. package/dist/commonjs/operations/desktops.js +245 -191
  20. package/dist/commonjs/operations/desktops.js.map +7 -1
  21. package/dist/commonjs/operations/hostPools.js +443 -385
  22. package/dist/commonjs/operations/hostPools.js.map +7 -1
  23. package/dist/commonjs/operations/index.js +34 -29
  24. package/dist/commonjs/operations/index.js.map +7 -1
  25. package/dist/commonjs/operations/msixImages.js +185 -132
  26. package/dist/commonjs/operations/msixImages.js.map +7 -1
  27. package/dist/commonjs/operations/msixPackages.js +317 -265
  28. package/dist/commonjs/operations/msixPackages.js.map +7 -1
  29. package/dist/commonjs/operations/operations.js +132 -109
  30. package/dist/commonjs/operations/operations.js.map +7 -1
  31. package/dist/commonjs/operations/privateEndpointConnections.js +540 -446
  32. package/dist/commonjs/operations/privateEndpointConnections.js.map +7 -1
  33. package/dist/commonjs/operations/privateLinkResources.js +309 -233
  34. package/dist/commonjs/operations/privateLinkResources.js.map +7 -1
  35. package/dist/commonjs/operations/scalingPlanPersonalSchedules.js +317 -261
  36. package/dist/commonjs/operations/scalingPlanPersonalSchedules.js.map +7 -1
  37. package/dist/commonjs/operations/scalingPlanPooledSchedules.js +317 -261
  38. package/dist/commonjs/operations/scalingPlanPooledSchedules.js.map +7 -1
  39. package/dist/commonjs/operations/scalingPlans.js +516 -433
  40. package/dist/commonjs/operations/scalingPlans.js.map +7 -1
  41. package/dist/commonjs/operations/sessionHosts.js +269 -220
  42. package/dist/commonjs/operations/sessionHosts.js.map +7 -1
  43. package/dist/commonjs/operations/startMenuItems.js +179 -131
  44. package/dist/commonjs/operations/startMenuItems.js.map +7 -1
  45. package/dist/commonjs/operations/userSessions.js +480 -387
  46. package/dist/commonjs/operations/userSessions.js.map +7 -1
  47. package/dist/commonjs/operations/workspaces.js +381 -326
  48. package/dist/commonjs/operations/workspaces.js.map +7 -1
  49. package/dist/commonjs/operationsInterfaces/appAttachPackageInfo.js +15 -10
  50. package/dist/commonjs/operationsInterfaces/appAttachPackageInfo.js.map +7 -1
  51. package/dist/commonjs/operationsInterfaces/appAttachPackageOperations.js +15 -10
  52. package/dist/commonjs/operationsInterfaces/appAttachPackageOperations.js.map +7 -1
  53. package/dist/commonjs/operationsInterfaces/applicationGroups.js +15 -10
  54. package/dist/commonjs/operationsInterfaces/applicationGroups.js.map +7 -1
  55. package/dist/commonjs/operationsInterfaces/applications.js +15 -10
  56. package/dist/commonjs/operationsInterfaces/applications.js.map +7 -1
  57. package/dist/commonjs/operationsInterfaces/desktops.js +15 -10
  58. package/dist/commonjs/operationsInterfaces/desktops.js.map +7 -1
  59. package/dist/commonjs/operationsInterfaces/hostPools.js +15 -10
  60. package/dist/commonjs/operationsInterfaces/hostPools.js.map +7 -1
  61. package/dist/commonjs/operationsInterfaces/index.js +34 -29
  62. package/dist/commonjs/operationsInterfaces/index.js.map +7 -1
  63. package/dist/commonjs/operationsInterfaces/msixImages.js +15 -10
  64. package/dist/commonjs/operationsInterfaces/msixImages.js.map +7 -1
  65. package/dist/commonjs/operationsInterfaces/msixPackages.js +15 -10
  66. package/dist/commonjs/operationsInterfaces/msixPackages.js.map +7 -1
  67. package/dist/commonjs/operationsInterfaces/operations.js +15 -10
  68. package/dist/commonjs/operationsInterfaces/operations.js.map +7 -1
  69. package/dist/commonjs/operationsInterfaces/privateEndpointConnections.js +15 -10
  70. package/dist/commonjs/operationsInterfaces/privateEndpointConnections.js.map +7 -1
  71. package/dist/commonjs/operationsInterfaces/privateLinkResources.js +15 -10
  72. package/dist/commonjs/operationsInterfaces/privateLinkResources.js.map +7 -1
  73. package/dist/commonjs/operationsInterfaces/scalingPlanPersonalSchedules.js +15 -10
  74. package/dist/commonjs/operationsInterfaces/scalingPlanPersonalSchedules.js.map +7 -1
  75. package/dist/commonjs/operationsInterfaces/scalingPlanPooledSchedules.js +15 -10
  76. package/dist/commonjs/operationsInterfaces/scalingPlanPooledSchedules.js.map +7 -1
  77. package/dist/commonjs/operationsInterfaces/scalingPlans.js +15 -10
  78. package/dist/commonjs/operationsInterfaces/scalingPlans.js.map +7 -1
  79. package/dist/commonjs/operationsInterfaces/sessionHosts.js +15 -10
  80. package/dist/commonjs/operationsInterfaces/sessionHosts.js.map +7 -1
  81. package/dist/commonjs/operationsInterfaces/startMenuItems.js +15 -10
  82. package/dist/commonjs/operationsInterfaces/startMenuItems.js.map +7 -1
  83. package/dist/commonjs/operationsInterfaces/userSessions.js +15 -10
  84. package/dist/commonjs/operationsInterfaces/userSessions.js.map +7 -1
  85. package/dist/commonjs/operationsInterfaces/workspaces.js +15 -10
  86. package/dist/commonjs/operationsInterfaces/workspaces.js.map +7 -1
  87. package/dist/commonjs/pagingHelper.js +34 -30
  88. package/dist/commonjs/pagingHelper.js.map +7 -1
  89. package/dist/esm/desktopVirtualizationAPIClient.js +144 -135
  90. package/dist/esm/desktopVirtualizationAPIClient.js.map +7 -1
  91. package/dist/esm/index.js +6 -11
  92. package/dist/esm/index.js.map +7 -1
  93. package/dist/esm/models/index.js +250 -376
  94. package/dist/esm/models/index.js.map +7 -1
  95. package/dist/esm/models/mappers.js +4079 -3996
  96. package/dist/esm/models/mappers.js.map +7 -1
  97. package/dist/esm/models/parameters.js +457 -390
  98. package/dist/esm/models/parameters.js.map +7 -1
  99. package/dist/esm/operations/appAttachPackageInfo.js +159 -130
  100. package/dist/esm/operations/appAttachPackageInfo.js.map +7 -1
  101. package/dist/esm/operations/appAttachPackageOperations.js +344 -313
  102. package/dist/esm/operations/appAttachPackageOperations.js.map +7 -1
  103. package/dist/esm/operations/applicationGroups.js +350 -319
  104. package/dist/esm/operations/applicationGroups.js.map +7 -1
  105. package/dist/esm/operations/applications.js +289 -253
  106. package/dist/esm/operations/applications.js.map +7 -1
  107. package/dist/esm/operations/desktops.js +213 -183
  108. package/dist/esm/operations/desktops.js.map +7 -1
  109. package/dist/esm/operations/hostPools.js +411 -377
  110. package/dist/esm/operations/hostPools.js.map +7 -1
  111. package/dist/esm/operations/index.js +0 -8
  112. package/dist/esm/operations/index.js.map +7 -1
  113. package/dist/esm/operations/msixImages.js +153 -124
  114. package/dist/esm/operations/msixImages.js.map +7 -1
  115. package/dist/esm/operations/msixPackages.js +285 -257
  116. package/dist/esm/operations/msixPackages.js.map +7 -1
  117. package/dist/esm/operations/operations.js +100 -101
  118. package/dist/esm/operations/operations.js.map +7 -1
  119. package/dist/esm/operations/privateEndpointConnections.js +508 -438
  120. package/dist/esm/operations/privateEndpointConnections.js.map +7 -1
  121. package/dist/esm/operations/privateLinkResources.js +277 -225
  122. package/dist/esm/operations/privateLinkResources.js.map +7 -1
  123. package/dist/esm/operations/scalingPlanPersonalSchedules.js +285 -253
  124. package/dist/esm/operations/scalingPlanPersonalSchedules.js.map +7 -1
  125. package/dist/esm/operations/scalingPlanPooledSchedules.js +285 -253
  126. package/dist/esm/operations/scalingPlanPooledSchedules.js.map +7 -1
  127. package/dist/esm/operations/scalingPlans.js +484 -425
  128. package/dist/esm/operations/scalingPlans.js.map +7 -1
  129. package/dist/esm/operations/sessionHosts.js +237 -212
  130. package/dist/esm/operations/sessionHosts.js.map +7 -1
  131. package/dist/esm/operations/startMenuItems.js +147 -123
  132. package/dist/esm/operations/startMenuItems.js.map +7 -1
  133. package/dist/esm/operations/userSessions.js +448 -379
  134. package/dist/esm/operations/userSessions.js.map +7 -1
  135. package/dist/esm/operations/workspaces.js +349 -318
  136. package/dist/esm/operations/workspaces.js.map +7 -1
  137. package/dist/esm/operationsInterfaces/appAttachPackageInfo.js +0 -9
  138. package/dist/esm/operationsInterfaces/appAttachPackageInfo.js.map +7 -1
  139. package/dist/esm/operationsInterfaces/appAttachPackageOperations.js +0 -9
  140. package/dist/esm/operationsInterfaces/appAttachPackageOperations.js.map +7 -1
  141. package/dist/esm/operationsInterfaces/applicationGroups.js +0 -9
  142. package/dist/esm/operationsInterfaces/applicationGroups.js.map +7 -1
  143. package/dist/esm/operationsInterfaces/applications.js +0 -9
  144. package/dist/esm/operationsInterfaces/applications.js.map +7 -1
  145. package/dist/esm/operationsInterfaces/desktops.js +0 -9
  146. package/dist/esm/operationsInterfaces/desktops.js.map +7 -1
  147. package/dist/esm/operationsInterfaces/hostPools.js +0 -9
  148. package/dist/esm/operationsInterfaces/hostPools.js.map +7 -1
  149. package/dist/esm/operationsInterfaces/index.js +0 -8
  150. package/dist/esm/operationsInterfaces/index.js.map +7 -1
  151. package/dist/esm/operationsInterfaces/msixImages.js +0 -9
  152. package/dist/esm/operationsInterfaces/msixImages.js.map +7 -1
  153. package/dist/esm/operationsInterfaces/msixPackages.js +0 -9
  154. package/dist/esm/operationsInterfaces/msixPackages.js.map +7 -1
  155. package/dist/esm/operationsInterfaces/operations.js +0 -9
  156. package/dist/esm/operationsInterfaces/operations.js.map +7 -1
  157. package/dist/esm/operationsInterfaces/privateEndpointConnections.js +0 -9
  158. package/dist/esm/operationsInterfaces/privateEndpointConnections.js.map +7 -1
  159. package/dist/esm/operationsInterfaces/privateLinkResources.js +0 -9
  160. package/dist/esm/operationsInterfaces/privateLinkResources.js.map +7 -1
  161. package/dist/esm/operationsInterfaces/scalingPlanPersonalSchedules.js +0 -9
  162. package/dist/esm/operationsInterfaces/scalingPlanPersonalSchedules.js.map +7 -1
  163. package/dist/esm/operationsInterfaces/scalingPlanPooledSchedules.js +0 -9
  164. package/dist/esm/operationsInterfaces/scalingPlanPooledSchedules.js.map +7 -1
  165. package/dist/esm/operationsInterfaces/scalingPlans.js +0 -9
  166. package/dist/esm/operationsInterfaces/scalingPlans.js.map +7 -1
  167. package/dist/esm/operationsInterfaces/sessionHosts.js +0 -9
  168. package/dist/esm/operationsInterfaces/sessionHosts.js.map +7 -1
  169. package/dist/esm/operationsInterfaces/startMenuItems.js +0 -9
  170. package/dist/esm/operationsInterfaces/startMenuItems.js.map +7 -1
  171. package/dist/esm/operationsInterfaces/userSessions.js +0 -9
  172. package/dist/esm/operationsInterfaces/userSessions.js.map +7 -1
  173. package/dist/esm/operationsInterfaces/workspaces.js +0 -9
  174. package/dist/esm/operationsInterfaces/workspaces.js.map +7 -1
  175. package/dist/esm/pagingHelper.js +17 -28
  176. package/dist/esm/pagingHelper.js.map +7 -1
  177. package/package.json +4 -21
@@ -1,145 +1,159 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.DesktopVirtualizationAPIClient = void 0;
11
- const tslib_1 = require("tslib");
12
- const coreClient = tslib_1.__importStar(require("@azure/core-client"));
13
- const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
14
- const index_js_1 = require("./operations/index.js");
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var desktopVirtualizationAPIClient_exports = {};
29
+ __export(desktopVirtualizationAPIClient_exports, {
30
+ DesktopVirtualizationAPIClient: () => DesktopVirtualizationAPIClient
31
+ });
32
+ module.exports = __toCommonJS(desktopVirtualizationAPIClient_exports);
33
+ var coreClient = __toESM(require("@azure/core-client"));
34
+ var coreRestPipeline = __toESM(require("@azure/core-rest-pipeline"));
35
+ var import_operations = require("./operations/index.js");
15
36
  class DesktopVirtualizationAPIClient extends coreClient.ServiceClient {
16
- $host;
17
- apiVersion;
18
- subscriptionId;
19
- /**
20
- * Initializes a new instance of the DesktopVirtualizationAPIClient class.
21
- * @param credentials Subscription credentials which uniquely identify client subscription.
22
- * @param subscriptionId The ID of the target subscription. The value must be an UUID.
23
- * @param options The parameter options
24
- */
25
- constructor(credentials, subscriptionId, options) {
26
- if (credentials === undefined) {
27
- throw new Error("'credentials' cannot be null");
28
- }
29
- if (subscriptionId === undefined) {
30
- throw new Error("'subscriptionId' cannot be null");
31
- }
32
- // Initializing default values for options
33
- if (!options) {
34
- options = {};
35
- }
36
- const defaults = {
37
- requestContentType: "application/json; charset=utf-8",
38
- credential: credentials,
39
- };
40
- const packageDetails = `azsdk-js-arm-desktopvirtualization/1.2.2`;
41
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
42
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
43
- : `${packageDetails}`;
44
- const optionsWithDefaults = {
45
- ...defaults,
46
- ...options,
47
- userAgentOptions: {
48
- userAgentPrefix,
49
- },
50
- endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
51
- };
52
- super(optionsWithDefaults);
53
- let bearerTokenAuthenticationPolicyFound = false;
54
- if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
55
- const pipelinePolicies = options.pipeline.getOrderedPolicies();
56
- bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
57
- coreRestPipeline.bearerTokenAuthenticationPolicyName);
58
- }
59
- if (!options ||
60
- !options.pipeline ||
61
- options.pipeline.getOrderedPolicies().length == 0 ||
62
- !bearerTokenAuthenticationPolicyFound) {
63
- this.pipeline.removePolicy({
64
- name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
65
- });
66
- this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
67
- credential: credentials,
68
- scopes: optionsWithDefaults.credentialScopes ??
69
- `${optionsWithDefaults.endpoint}/.default`,
70
- challengeCallbacks: {
71
- authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
72
- },
73
- }));
74
- }
75
- // Parameter assignments
76
- this.subscriptionId = subscriptionId;
77
- // Assigning values to Constant parameters
78
- this.$host = options.$host || "https://management.azure.com";
79
- this.apiVersion = options.apiVersion || "2024-04-03";
80
- this.operations = new index_js_1.OperationsImpl(this);
81
- this.workspaces = new index_js_1.WorkspacesImpl(this);
82
- this.privateEndpointConnections = new index_js_1.PrivateEndpointConnectionsImpl(this);
83
- this.privateLinkResources = new index_js_1.PrivateLinkResourcesImpl(this);
84
- this.scalingPlans = new index_js_1.ScalingPlansImpl(this);
85
- this.scalingPlanPooledSchedules = new index_js_1.ScalingPlanPooledSchedulesImpl(this);
86
- this.scalingPlanPersonalSchedules = new index_js_1.ScalingPlanPersonalSchedulesImpl(this);
87
- this.applicationGroups = new index_js_1.ApplicationGroupsImpl(this);
88
- this.startMenuItems = new index_js_1.StartMenuItemsImpl(this);
89
- this.applications = new index_js_1.ApplicationsImpl(this);
90
- this.desktops = new index_js_1.DesktopsImpl(this);
91
- this.hostPools = new index_js_1.HostPoolsImpl(this);
92
- this.userSessions = new index_js_1.UserSessionsImpl(this);
93
- this.sessionHosts = new index_js_1.SessionHostsImpl(this);
94
- this.msixPackages = new index_js_1.MsixPackagesImpl(this);
95
- this.appAttachPackageInfo = new index_js_1.AppAttachPackageInfoImpl(this);
96
- this.msixImages = new index_js_1.MsixImagesImpl(this);
97
- this.appAttachPackageOperations = new index_js_1.AppAttachPackageOperationsImpl(this);
98
- this.addCustomApiVersionPolicy(options.apiVersion);
37
+ $host;
38
+ apiVersion;
39
+ subscriptionId;
40
+ /**
41
+ * Initializes a new instance of the DesktopVirtualizationAPIClient class.
42
+ * @param credentials Subscription credentials which uniquely identify client subscription.
43
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
44
+ * @param options The parameter options
45
+ */
46
+ constructor(credentials, subscriptionId, options) {
47
+ if (credentials === void 0) {
48
+ throw new Error("'credentials' cannot be null");
99
49
  }
100
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
101
- addCustomApiVersionPolicy(apiVersion) {
102
- if (!apiVersion) {
103
- return;
104
- }
105
- const apiVersionPolicy = {
106
- name: "CustomApiVersionPolicy",
107
- async sendRequest(request, next) {
108
- const param = request.url.split("?");
109
- if (param.length > 1) {
110
- const newParams = param[1].split("&").map((item) => {
111
- if (item.indexOf("api-version") > -1) {
112
- return "api-version=" + apiVersion;
113
- }
114
- else {
115
- return item;
116
- }
117
- });
118
- request.url = param[0] + "?" + newParams.join("&");
119
- }
120
- return next(request);
121
- },
122
- };
123
- this.pipeline.addPolicy(apiVersionPolicy);
50
+ if (subscriptionId === void 0) {
51
+ throw new Error("'subscriptionId' cannot be null");
124
52
  }
125
- operations;
126
- workspaces;
127
- privateEndpointConnections;
128
- privateLinkResources;
129
- scalingPlans;
130
- scalingPlanPooledSchedules;
131
- scalingPlanPersonalSchedules;
132
- applicationGroups;
133
- startMenuItems;
134
- applications;
135
- desktops;
136
- hostPools;
137
- userSessions;
138
- sessionHosts;
139
- msixPackages;
140
- appAttachPackageInfo;
141
- msixImages;
142
- appAttachPackageOperations;
53
+ if (!options) {
54
+ options = {};
55
+ }
56
+ const defaults = {
57
+ requestContentType: "application/json; charset=utf-8",
58
+ credential: credentials
59
+ };
60
+ const packageDetails = `azsdk-js-arm-desktopvirtualization/1.2.2`;
61
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`;
62
+ const optionsWithDefaults = {
63
+ ...defaults,
64
+ ...options,
65
+ userAgentOptions: {
66
+ userAgentPrefix
67
+ },
68
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
69
+ };
70
+ super(optionsWithDefaults);
71
+ let bearerTokenAuthenticationPolicyFound = false;
72
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
73
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
74
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
75
+ (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName
76
+ );
77
+ }
78
+ if (!options || !options.pipeline || options.pipeline.getOrderedPolicies().length == 0 || !bearerTokenAuthenticationPolicyFound) {
79
+ this.pipeline.removePolicy({
80
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
81
+ });
82
+ this.pipeline.addPolicy(
83
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
84
+ credential: credentials,
85
+ scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
86
+ challengeCallbacks: {
87
+ authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
88
+ }
89
+ })
90
+ );
91
+ }
92
+ this.subscriptionId = subscriptionId;
93
+ this.$host = options.$host || "https://management.azure.com";
94
+ this.apiVersion = options.apiVersion || "2024-04-03";
95
+ this.operations = new import_operations.OperationsImpl(this);
96
+ this.workspaces = new import_operations.WorkspacesImpl(this);
97
+ this.privateEndpointConnections = new import_operations.PrivateEndpointConnectionsImpl(this);
98
+ this.privateLinkResources = new import_operations.PrivateLinkResourcesImpl(this);
99
+ this.scalingPlans = new import_operations.ScalingPlansImpl(this);
100
+ this.scalingPlanPooledSchedules = new import_operations.ScalingPlanPooledSchedulesImpl(this);
101
+ this.scalingPlanPersonalSchedules = new import_operations.ScalingPlanPersonalSchedulesImpl(
102
+ this
103
+ );
104
+ this.applicationGroups = new import_operations.ApplicationGroupsImpl(this);
105
+ this.startMenuItems = new import_operations.StartMenuItemsImpl(this);
106
+ this.applications = new import_operations.ApplicationsImpl(this);
107
+ this.desktops = new import_operations.DesktopsImpl(this);
108
+ this.hostPools = new import_operations.HostPoolsImpl(this);
109
+ this.userSessions = new import_operations.UserSessionsImpl(this);
110
+ this.sessionHosts = new import_operations.SessionHostsImpl(this);
111
+ this.msixPackages = new import_operations.MsixPackagesImpl(this);
112
+ this.appAttachPackageInfo = new import_operations.AppAttachPackageInfoImpl(this);
113
+ this.msixImages = new import_operations.MsixImagesImpl(this);
114
+ this.appAttachPackageOperations = new import_operations.AppAttachPackageOperationsImpl(this);
115
+ this.addCustomApiVersionPolicy(options.apiVersion);
116
+ }
117
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
118
+ addCustomApiVersionPolicy(apiVersion) {
119
+ if (!apiVersion) {
120
+ return;
121
+ }
122
+ const apiVersionPolicy = {
123
+ name: "CustomApiVersionPolicy",
124
+ async sendRequest(request, next) {
125
+ const param = request.url.split("?");
126
+ if (param.length > 1) {
127
+ const newParams = param[1].split("&").map((item) => {
128
+ if (item.indexOf("api-version") > -1) {
129
+ return "api-version=" + apiVersion;
130
+ } else {
131
+ return item;
132
+ }
133
+ });
134
+ request.url = param[0] + "?" + newParams.join("&");
135
+ }
136
+ return next(request);
137
+ }
138
+ };
139
+ this.pipeline.addPolicy(apiVersionPolicy);
140
+ }
141
+ operations;
142
+ workspaces;
143
+ privateEndpointConnections;
144
+ privateLinkResources;
145
+ scalingPlans;
146
+ scalingPlanPooledSchedules;
147
+ scalingPlanPersonalSchedules;
148
+ applicationGroups;
149
+ startMenuItems;
150
+ applications;
151
+ desktops;
152
+ hostPools;
153
+ userSessions;
154
+ sessionHosts;
155
+ msixPackages;
156
+ appAttachPackageInfo;
157
+ msixImages;
158
+ appAttachPackageOperations;
143
159
  }
144
- exports.DesktopVirtualizationAPIClient = DesktopVirtualizationAPIClient;
145
- //# sourceMappingURL=desktopVirtualizationAPIClient.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"desktopVirtualizationAPIClient.js","sourceRoot":"","sources":["../../src/desktopVirtualizationAPIClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAmB+B;AAuB/B,MAAa,8BAA+B,SAAQ,UAAU,CAAC,aAAa;IAC1E,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAsD;QAEtD,IAAI,WAAW,KAAK,SAAS,EAAE,CA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AC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,UAAU,CAAa;IACvB,0BAA0B,CAA6B;IACvD,oBAAoB,CAAuB;IAC3C,YAAY,CAAe;IAC3B,0BAA0B,CAA6B;IACvD,4BAA4B,CAA+B;IAC3D,iBAAiB,CAAoB;IACrC,cAAc,CAAiB;IAC/B,YAAY,CAAe;IAC3B,QAAQ,CAAW;IACnB,SAAS,CAAY;IACrB,YAAY,CAAe;IAC3B,YAAY,CAAe;IAC3B,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,UAAU,CAAa;IACvB,0BAA0B,CAA6B;CACxD;AA5JD,wEA4JC","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 OperationsImpl,\n WorkspacesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n ScalingPlansImpl,\n ScalingPlanPooledSchedulesImpl,\n ScalingPlanPersonalSchedulesImpl,\n ApplicationGroupsImpl,\n StartMenuItemsImpl,\n ApplicationsImpl,\n DesktopsImpl,\n HostPoolsImpl,\n UserSessionsImpl,\n SessionHostsImpl,\n MsixPackagesImpl,\n AppAttachPackageInfoImpl,\n MsixImagesImpl,\n AppAttachPackageOperationsImpl,\n} from \"./operations/index.js\";\nimport {\n Operations,\n Workspaces,\n PrivateEndpointConnections,\n PrivateLinkResources,\n ScalingPlans,\n ScalingPlanPooledSchedules,\n ScalingPlanPersonalSchedules,\n ApplicationGroups,\n StartMenuItems,\n Applications,\n Desktops,\n HostPools,\n UserSessions,\n SessionHosts,\n MsixPackages,\n AppAttachPackageInfo,\n MsixImages,\n AppAttachPackageOperations,\n} from \"./operationsInterfaces/index.js\";\nimport { DesktopVirtualizationAPIClientOptionalParams } from \"./models/index.js\";\n\nexport class DesktopVirtualizationAPIClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the DesktopVirtualizationAPIClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription. The value must be an UUID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DesktopVirtualizationAPIClientOptionalParams,\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: DesktopVirtualizationAPIClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-desktopvirtualization/1.2.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n 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 || \"2024-04-03\";\n this.operations = new OperationsImpl(this);\n this.workspaces = new WorkspacesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.scalingPlans = new ScalingPlansImpl(this);\n this.scalingPlanPooledSchedules = new ScalingPlanPooledSchedulesImpl(this);\n this.scalingPlanPersonalSchedules = new ScalingPlanPersonalSchedulesImpl(\n this,\n );\n this.applicationGroups = new ApplicationGroupsImpl(this);\n this.startMenuItems = new StartMenuItemsImpl(this);\n this.applications = new ApplicationsImpl(this);\n this.desktops = new DesktopsImpl(this);\n this.hostPools = new HostPoolsImpl(this);\n this.userSessions = new UserSessionsImpl(this);\n this.sessionHosts = new SessionHostsImpl(this);\n this.msixPackages = new MsixPackagesImpl(this);\n this.appAttachPackageInfo = new AppAttachPackageInfoImpl(this);\n this.msixImages = new MsixImagesImpl(this);\n this.appAttachPackageOperations = new AppAttachPackageOperationsImpl(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 operations: Operations;\n workspaces: Workspaces;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n scalingPlans: ScalingPlans;\n scalingPlanPooledSchedules: ScalingPlanPooledSchedules;\n scalingPlanPersonalSchedules: ScalingPlanPersonalSchedules;\n applicationGroups: ApplicationGroups;\n startMenuItems: StartMenuItems;\n applications: Applications;\n desktops: Desktops;\n hostPools: HostPools;\n userSessions: UserSessions;\n sessionHosts: SessionHosts;\n msixPackages: MsixPackages;\n appAttachPackageInfo: AppAttachPackageInfo;\n msixImages: MsixImages;\n appAttachPackageOperations: AppAttachPackageOperations;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts"],
4
+ "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 OperationsImpl,\n WorkspacesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n ScalingPlansImpl,\n ScalingPlanPooledSchedulesImpl,\n ScalingPlanPersonalSchedulesImpl,\n ApplicationGroupsImpl,\n StartMenuItemsImpl,\n ApplicationsImpl,\n DesktopsImpl,\n HostPoolsImpl,\n UserSessionsImpl,\n SessionHostsImpl,\n MsixPackagesImpl,\n AppAttachPackageInfoImpl,\n MsixImagesImpl,\n AppAttachPackageOperationsImpl,\n} from \"./operations/index.js\";\nimport {\n Operations,\n Workspaces,\n PrivateEndpointConnections,\n PrivateLinkResources,\n ScalingPlans,\n ScalingPlanPooledSchedules,\n ScalingPlanPersonalSchedules,\n ApplicationGroups,\n StartMenuItems,\n Applications,\n Desktops,\n HostPools,\n UserSessions,\n SessionHosts,\n MsixPackages,\n AppAttachPackageInfo,\n MsixImages,\n AppAttachPackageOperations,\n} from \"./operationsInterfaces/index.js\";\nimport { DesktopVirtualizationAPIClientOptionalParams } from \"./models/index.js\";\n\nexport class DesktopVirtualizationAPIClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the DesktopVirtualizationAPIClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription. The value must be an UUID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DesktopVirtualizationAPIClientOptionalParams,\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: DesktopVirtualizationAPIClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-desktopvirtualization/1.2.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n 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 || \"2024-04-03\";\n this.operations = new OperationsImpl(this);\n this.workspaces = new WorkspacesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.scalingPlans = new ScalingPlansImpl(this);\n this.scalingPlanPooledSchedules = new ScalingPlanPooledSchedulesImpl(this);\n this.scalingPlanPersonalSchedules = new ScalingPlanPersonalSchedulesImpl(\n this,\n );\n this.applicationGroups = new ApplicationGroupsImpl(this);\n this.startMenuItems = new StartMenuItemsImpl(this);\n this.applications = new ApplicationsImpl(this);\n this.desktops = new DesktopsImpl(this);\n this.hostPools = new HostPoolsImpl(this);\n this.userSessions = new UserSessionsImpl(this);\n this.sessionHosts = new SessionHostsImpl(this);\n this.msixPackages = new MsixPackagesImpl(this);\n this.appAttachPackageInfo = new AppAttachPackageInfoImpl(this);\n this.msixImages = new MsixImagesImpl(this);\n this.appAttachPackageOperations = new AppAttachPackageOperationsImpl(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 operations: Operations;\n workspaces: Workspaces;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n scalingPlans: ScalingPlans;\n scalingPlanPooledSchedules: ScalingPlanPooledSchedules;\n scalingPlanPersonalSchedules: ScalingPlanPersonalSchedules;\n applicationGroups: ApplicationGroups;\n startMenuItems: StartMenuItems;\n applications: Applications;\n desktops: Desktops;\n hostPools: HostPools;\n userSessions: UserSessions;\n sessionHosts: SessionHosts;\n msixPackages: MsixPackages;\n appAttachPackageInfo: AppAttachPackageInfo;\n msixImages: MsixImages;\n appAttachPackageOperations: AppAttachPackageOperations;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,iBAA4B;AAC5B,uBAAkC;AAOlC,wBAmBO;AAuBA,MAAM,uCAAuC,WAAW,cAAc;AAAA,EAC3E;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,YACE,aACA,gBACA,SACA;AACA,QAAI,gBAAgB,QAAW;AAC7B,YAAM,IAAI,MAAM,8BAA8B;AAAA,IAChD;AACA,QAAI,mBAAmB,QAAW;AAChC,YAAM,IAAI,MAAM,iCAAiC;AAAA,IACnD;AAGA,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAC;AAAA,IACb;AACA,UAAM,WAAyD;AAAA,MAC7D,oBAAoB;AAAA,MACpB,YAAY;AAAA,IACd;AAEA,UAAM,iBAAiB;AACvB,UAAM,kBACJ,QAAQ,oBAAoB,QAAQ,iBAAiB,kBACjD,GAAG,QAAQ,iBAAiB,eAAe,IAAI,cAAc,KAC7D,GAAG,cAAc;AAEvB,UAAM,sBAAsB;AAAA,MAC1B,GAAG;AAAA,MACH,GAAG;AAAA,MACH,kBAAkB;AAAA,QAChB;AAAA,MACF;AAAA,MACA,UACE,QAAQ,YAAY,QAAQ,WAAW;AAAA,IAC3C;AACA,UAAM,mBAAmB;AAEzB,QAAI,uCAAgD;AACpD,QAAI,SAAS,YAAY,QAAQ,SAAS,mBAAmB,EAAE,SAAS,GAAG;AACzE,YAAM,mBACJ,QAAQ,SAAS,mBAAmB;AACtC,6CAAuC,iBAAiB;AAAA,QACtD,CAAC,mBACC,eAAe,SACf,iBAAiB;AAAA,MACrB;AAAA,IACF;AACA,QACE,CAAC,WACD,CAAC,QAAQ,YACT,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,CAAC,YAAY;AACf;AAAA,IACF;AACA,UAAM,mBAAmB;AAAA,MACvB,MAAM;AAAA,MACN,MAAM,YACJ,SACA,MAC2B;AAC3B,cAAM,QAAQ,QAAQ,IAAI,MAAM,GAAG;AACnC,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,YAAY,MAAM,CAAC,EAAE,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS;AAClD,gBAAI,KAAK,QAAQ,aAAa,IAAI,IAAI;AACpC,qBAAO,iBAAiB;AAAA,YAC1B,OAAO;AACL,qBAAO;AAAA,YACT;AAAA,UACF,CAAC;AACD,kBAAQ,MAAM,MAAM,CAAC,IAAI,MAAM,UAAU,KAAK,GAAG;AAAA,QACnD;AACA,eAAO,KAAK,OAAO;AAAA,MACrB;AAAA,IACF;AACA,SAAK,SAAS,UAAU,gBAAgB;AAAA,EAC1C;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
+ "names": []
7
+ }
@@ -1,19 +1,28 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.DesktopVirtualizationAPIClient = exports.getContinuationToken = void 0;
11
- const tslib_1 = require("tslib");
12
- /// <reference lib="esnext.asynciterable" />
13
- var pagingHelper_js_1 = require("./pagingHelper.js");
14
- Object.defineProperty(exports, "getContinuationToken", { enumerable: true, get: function () { return pagingHelper_js_1.getContinuationToken; } });
15
- tslib_1.__exportStar(require("./models/index.js"), exports);
16
- var desktopVirtualizationAPIClient_js_1 = require("./desktopVirtualizationAPIClient.js");
17
- Object.defineProperty(exports, "DesktopVirtualizationAPIClient", { enumerable: true, get: function () { return desktopVirtualizationAPIClient_js_1.DesktopVirtualizationAPIClient; } });
18
- tslib_1.__exportStar(require("./operationsInterfaces/index.js"), exports);
19
- //# sourceMappingURL=index.js.map
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var src_exports = {};
20
+ __export(src_exports, {
21
+ DesktopVirtualizationAPIClient: () => import_desktopVirtualizationAPIClient.DesktopVirtualizationAPIClient,
22
+ getContinuationToken: () => import_pagingHelper.getContinuationToken
23
+ });
24
+ module.exports = __toCommonJS(src_exports);
25
+ var import_pagingHelper = require("./pagingHelper.js");
26
+ __reExport(src_exports, require("./models/index.js"), module.exports);
27
+ var import_desktopVirtualizationAPIClient = require("./desktopVirtualizationAPIClient.js");
28
+ __reExport(src_exports, require("./operationsInterfaces/index.js"), module.exports);
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,4CAA4C;AAC5C,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA;AAC7B,4DAAkC;AAClC,yFAAqF;AAA5E,mJAAA,8BAA8B,OAAA;AACvC,0EAAgD","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\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { DesktopVirtualizationAPIClient } from \"./desktopVirtualizationAPIClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/desktopvirtualization/arm-desktopvirtualization/src/index.ts"],
4
+ "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\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { DesktopVirtualizationAPIClient } from \"./desktopVirtualizationAPIClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,0BAAqC;AACrC,wBAAc,8BAVd;AAWA,4CAA+C;AAC/C,wBAAc,4CAZd;",
6
+ "names": []
7
+ }