@azure/arm-devtestlabs 4.1.2-alpha.20260302.1 → 4.1.2-alpha.20260304.1

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 (237) hide show
  1. package/dist/commonjs/devTestLabsClient.js +171 -155
  2. package/dist/commonjs/devTestLabsClient.js.map +7 -1
  3. package/dist/commonjs/index.js +35 -19
  4. package/dist/commonjs/index.js.map +7 -1
  5. package/dist/commonjs/lroImpl.js +44 -35
  6. package/dist/commonjs/lroImpl.js.map +7 -1
  7. package/dist/commonjs/models/index.js +249 -323
  8. package/dist/commonjs/models/index.js.map +7 -1
  9. package/dist/commonjs/models/mappers.js +4627 -4354
  10. package/dist/commonjs/models/mappers.js.map +7 -1
  11. package/dist/commonjs/models/parameters.js +501 -363
  12. package/dist/commonjs/models/parameters.js.map +7 -1
  13. package/dist/commonjs/operations/armTemplates.js +235 -175
  14. package/dist/commonjs/operations/armTemplates.js.map +7 -1
  15. package/dist/commonjs/operations/artifactSources.js +320 -264
  16. package/dist/commonjs/operations/artifactSources.js.map +7 -1
  17. package/dist/commonjs/operations/artifacts.js +280 -217
  18. package/dist/commonjs/operations/artifacts.js.map +7 -1
  19. package/dist/commonjs/operations/costs.js +122 -91
  20. package/dist/commonjs/operations/costs.js.map +7 -1
  21. package/dist/commonjs/operations/customImages.js +431 -362
  22. package/dist/commonjs/operations/customImages.js.map +7 -1
  23. package/dist/commonjs/operations/disks.js +660 -559
  24. package/dist/commonjs/operations/disks.js.map +7 -1
  25. package/dist/commonjs/operations/environments.js +456 -377
  26. package/dist/commonjs/operations/environments.js.map +7 -1
  27. package/dist/commonjs/operations/formulas.js +380 -317
  28. package/dist/commonjs/operations/formulas.js.map +7 -1
  29. package/dist/commonjs/operations/galleryImages.js +183 -139
  30. package/dist/commonjs/operations/galleryImages.js.map +7 -1
  31. package/dist/commonjs/operations/globalSchedules.js +569 -497
  32. package/dist/commonjs/operations/globalSchedules.js.map +7 -1
  33. package/dist/commonjs/operations/index.js +69 -36
  34. package/dist/commonjs/operations/index.js.map +7 -1
  35. package/dist/commonjs/operations/labs.js +994 -874
  36. package/dist/commonjs/operations/labs.js.map +7 -1
  37. package/dist/commonjs/operations/notificationChannels.js +354 -295
  38. package/dist/commonjs/operations/notificationChannels.js.map +7 -1
  39. package/dist/commonjs/operations/operations.js +85 -57
  40. package/dist/commonjs/operations/operations.js.map +7 -1
  41. package/dist/commonjs/operations/policies.js +346 -277
  42. package/dist/commonjs/operations/policies.js.map +7 -1
  43. package/dist/commonjs/operations/policySets.js +87 -59
  44. package/dist/commonjs/operations/policySets.js.map +7 -1
  45. package/dist/commonjs/operations/providerOperations.js +137 -110
  46. package/dist/commonjs/operations/providerOperations.js.map +7 -1
  47. package/dist/commonjs/operations/schedules.js +542 -444
  48. package/dist/commonjs/operations/schedules.js.map +7 -1
  49. package/dist/commonjs/operations/secrets.js +403 -331
  50. package/dist/commonjs/operations/secrets.js.map +7 -1
  51. package/dist/commonjs/operations/serviceFabricSchedules.js +502 -417
  52. package/dist/commonjs/operations/serviceFabricSchedules.js.map +7 -1
  53. package/dist/commonjs/operations/serviceFabrics.js +666 -564
  54. package/dist/commonjs/operations/serviceFabrics.js.map +7 -1
  55. package/dist/commonjs/operations/serviceRunners.js +154 -120
  56. package/dist/commonjs/operations/serviceRunners.js.map +7 -1
  57. package/dist/commonjs/operations/users.js +431 -362
  58. package/dist/commonjs/operations/users.js.map +7 -1
  59. package/dist/commonjs/operations/virtualMachineSchedules.js +450 -371
  60. package/dist/commonjs/operations/virtualMachineSchedules.js.map +7 -1
  61. package/dist/commonjs/operations/virtualMachines.js +1447 -1269
  62. package/dist/commonjs/operations/virtualMachines.js.map +7 -1
  63. package/dist/commonjs/operations/virtualNetworks.js +431 -362
  64. package/dist/commonjs/operations/virtualNetworks.js.map +7 -1
  65. package/dist/commonjs/operationsInterfaces/armTemplates.js +15 -10
  66. package/dist/commonjs/operationsInterfaces/armTemplates.js.map +7 -1
  67. package/dist/commonjs/operationsInterfaces/artifactSources.js +15 -10
  68. package/dist/commonjs/operationsInterfaces/artifactSources.js.map +7 -1
  69. package/dist/commonjs/operationsInterfaces/artifacts.js +15 -10
  70. package/dist/commonjs/operationsInterfaces/artifacts.js.map +7 -1
  71. package/dist/commonjs/operationsInterfaces/costs.js +15 -10
  72. package/dist/commonjs/operationsInterfaces/costs.js.map +7 -1
  73. package/dist/commonjs/operationsInterfaces/customImages.js +15 -10
  74. package/dist/commonjs/operationsInterfaces/customImages.js.map +7 -1
  75. package/dist/commonjs/operationsInterfaces/disks.js +15 -10
  76. package/dist/commonjs/operationsInterfaces/disks.js.map +7 -1
  77. package/dist/commonjs/operationsInterfaces/environments.js +15 -10
  78. package/dist/commonjs/operationsInterfaces/environments.js.map +7 -1
  79. package/dist/commonjs/operationsInterfaces/formulas.js +15 -10
  80. package/dist/commonjs/operationsInterfaces/formulas.js.map +7 -1
  81. package/dist/commonjs/operationsInterfaces/galleryImages.js +15 -10
  82. package/dist/commonjs/operationsInterfaces/galleryImages.js.map +7 -1
  83. package/dist/commonjs/operationsInterfaces/globalSchedules.js +15 -10
  84. package/dist/commonjs/operationsInterfaces/globalSchedules.js.map +7 -1
  85. package/dist/commonjs/operationsInterfaces/index.js +69 -36
  86. package/dist/commonjs/operationsInterfaces/index.js.map +7 -1
  87. package/dist/commonjs/operationsInterfaces/labs.js +15 -10
  88. package/dist/commonjs/operationsInterfaces/labs.js.map +7 -1
  89. package/dist/commonjs/operationsInterfaces/notificationChannels.js +15 -10
  90. package/dist/commonjs/operationsInterfaces/notificationChannels.js.map +7 -1
  91. package/dist/commonjs/operationsInterfaces/operations.js +15 -10
  92. package/dist/commonjs/operationsInterfaces/operations.js.map +7 -1
  93. package/dist/commonjs/operationsInterfaces/policies.js +15 -10
  94. package/dist/commonjs/operationsInterfaces/policies.js.map +7 -1
  95. package/dist/commonjs/operationsInterfaces/policySets.js +15 -10
  96. package/dist/commonjs/operationsInterfaces/policySets.js.map +7 -1
  97. package/dist/commonjs/operationsInterfaces/providerOperations.js +15 -10
  98. package/dist/commonjs/operationsInterfaces/providerOperations.js.map +7 -1
  99. package/dist/commonjs/operationsInterfaces/schedules.js +15 -10
  100. package/dist/commonjs/operationsInterfaces/schedules.js.map +7 -1
  101. package/dist/commonjs/operationsInterfaces/secrets.js +15 -10
  102. package/dist/commonjs/operationsInterfaces/secrets.js.map +7 -1
  103. package/dist/commonjs/operationsInterfaces/serviceFabricSchedules.js +15 -10
  104. package/dist/commonjs/operationsInterfaces/serviceFabricSchedules.js.map +7 -1
  105. package/dist/commonjs/operationsInterfaces/serviceFabrics.js +15 -10
  106. package/dist/commonjs/operationsInterfaces/serviceFabrics.js.map +7 -1
  107. package/dist/commonjs/operationsInterfaces/serviceRunners.js +15 -10
  108. package/dist/commonjs/operationsInterfaces/serviceRunners.js.map +7 -1
  109. package/dist/commonjs/operationsInterfaces/users.js +15 -10
  110. package/dist/commonjs/operationsInterfaces/users.js.map +7 -1
  111. package/dist/commonjs/operationsInterfaces/virtualMachineSchedules.js +15 -10
  112. package/dist/commonjs/operationsInterfaces/virtualMachineSchedules.js.map +7 -1
  113. package/dist/commonjs/operationsInterfaces/virtualMachines.js +15 -10
  114. package/dist/commonjs/operationsInterfaces/virtualMachines.js.map +7 -1
  115. package/dist/commonjs/operationsInterfaces/virtualNetworks.js +15 -10
  116. package/dist/commonjs/operationsInterfaces/virtualNetworks.js.map +7 -1
  117. package/dist/commonjs/pagingHelper.js +39 -30
  118. package/dist/commonjs/pagingHelper.js.map +7 -1
  119. package/dist/esm/devTestLabsClient.js +163 -149
  120. package/dist/esm/devTestLabsClient.js.map +7 -1
  121. package/dist/esm/index.js +6 -11
  122. package/dist/esm/index.js.map +7 -1
  123. package/dist/esm/lroImpl.js +22 -32
  124. package/dist/esm/lroImpl.js.map +7 -1
  125. package/dist/esm/models/index.js +204 -320
  126. package/dist/esm/models/index.js.map +7 -1
  127. package/dist/esm/models/mappers.js +4473 -4348
  128. package/dist/esm/models/mappers.js.map +7 -1
  129. package/dist/esm/models/parameters.js +460 -358
  130. package/dist/esm/models/parameters.js.map +7 -1
  131. package/dist/esm/operations/armTemplates.js +199 -167
  132. package/dist/esm/operations/armTemplates.js.map +7 -1
  133. package/dist/esm/operations/artifactSources.js +284 -256
  134. package/dist/esm/operations/artifactSources.js.map +7 -1
  135. package/dist/esm/operations/artifacts.js +244 -209
  136. package/dist/esm/operations/artifacts.js.map +7 -1
  137. package/dist/esm/operations/costs.js +87 -84
  138. package/dist/esm/operations/costs.js.map +7 -1
  139. package/dist/esm/operations/customImages.js +393 -352
  140. package/dist/esm/operations/customImages.js.map +7 -1
  141. package/dist/esm/operations/disks.js +622 -549
  142. package/dist/esm/operations/disks.js.map +7 -1
  143. package/dist/esm/operations/environments.js +418 -367
  144. package/dist/esm/operations/environments.js.map +7 -1
  145. package/dist/esm/operations/formulas.js +342 -307
  146. package/dist/esm/operations/formulas.js.map +7 -1
  147. package/dist/esm/operations/galleryImages.js +147 -131
  148. package/dist/esm/operations/galleryImages.js.map +7 -1
  149. package/dist/esm/operations/globalSchedules.js +531 -487
  150. package/dist/esm/operations/globalSchedules.js.map +7 -1
  151. package/dist/esm/operations/index.js +0 -8
  152. package/dist/esm/operations/index.js.map +7 -1
  153. package/dist/esm/operations/labs.js +956 -864
  154. package/dist/esm/operations/labs.js.map +7 -1
  155. package/dist/esm/operations/notificationChannels.js +318 -287
  156. package/dist/esm/operations/notificationChannels.js.map +7 -1
  157. package/dist/esm/operations/operations.js +50 -50
  158. package/dist/esm/operations/operations.js.map +7 -1
  159. package/dist/esm/operations/policies.js +310 -269
  160. package/dist/esm/operations/policies.js.map +7 -1
  161. package/dist/esm/operations/policySets.js +52 -52
  162. package/dist/esm/operations/policySets.js.map +7 -1
  163. package/dist/esm/operations/providerOperations.js +101 -102
  164. package/dist/esm/operations/providerOperations.js.map +7 -1
  165. package/dist/esm/operations/schedules.js +504 -434
  166. package/dist/esm/operations/schedules.js.map +7 -1
  167. package/dist/esm/operations/secrets.js +365 -321
  168. package/dist/esm/operations/secrets.js.map +7 -1
  169. package/dist/esm/operations/serviceFabricSchedules.js +464 -407
  170. package/dist/esm/operations/serviceFabricSchedules.js.map +7 -1
  171. package/dist/esm/operations/serviceFabrics.js +628 -554
  172. package/dist/esm/operations/serviceFabrics.js.map +7 -1
  173. package/dist/esm/operations/serviceRunners.js +119 -113
  174. package/dist/esm/operations/serviceRunners.js.map +7 -1
  175. package/dist/esm/operations/users.js +393 -352
  176. package/dist/esm/operations/users.js.map +7 -1
  177. package/dist/esm/operations/virtualMachineSchedules.js +412 -361
  178. package/dist/esm/operations/virtualMachineSchedules.js.map +7 -1
  179. package/dist/esm/operations/virtualMachines.js +1409 -1259
  180. package/dist/esm/operations/virtualMachines.js.map +7 -1
  181. package/dist/esm/operations/virtualNetworks.js +393 -352
  182. package/dist/esm/operations/virtualNetworks.js.map +7 -1
  183. package/dist/esm/operationsInterfaces/armTemplates.js +0 -9
  184. package/dist/esm/operationsInterfaces/armTemplates.js.map +7 -1
  185. package/dist/esm/operationsInterfaces/artifactSources.js +0 -9
  186. package/dist/esm/operationsInterfaces/artifactSources.js.map +7 -1
  187. package/dist/esm/operationsInterfaces/artifacts.js +0 -9
  188. package/dist/esm/operationsInterfaces/artifacts.js.map +7 -1
  189. package/dist/esm/operationsInterfaces/costs.js +0 -9
  190. package/dist/esm/operationsInterfaces/costs.js.map +7 -1
  191. package/dist/esm/operationsInterfaces/customImages.js +0 -9
  192. package/dist/esm/operationsInterfaces/customImages.js.map +7 -1
  193. package/dist/esm/operationsInterfaces/disks.js +0 -9
  194. package/dist/esm/operationsInterfaces/disks.js.map +7 -1
  195. package/dist/esm/operationsInterfaces/environments.js +0 -9
  196. package/dist/esm/operationsInterfaces/environments.js.map +7 -1
  197. package/dist/esm/operationsInterfaces/formulas.js +0 -9
  198. package/dist/esm/operationsInterfaces/formulas.js.map +7 -1
  199. package/dist/esm/operationsInterfaces/galleryImages.js +0 -9
  200. package/dist/esm/operationsInterfaces/galleryImages.js.map +7 -1
  201. package/dist/esm/operationsInterfaces/globalSchedules.js +0 -9
  202. package/dist/esm/operationsInterfaces/globalSchedules.js.map +7 -1
  203. package/dist/esm/operationsInterfaces/index.js +0 -8
  204. package/dist/esm/operationsInterfaces/index.js.map +7 -1
  205. package/dist/esm/operationsInterfaces/labs.js +0 -9
  206. package/dist/esm/operationsInterfaces/labs.js.map +7 -1
  207. package/dist/esm/operationsInterfaces/notificationChannels.js +0 -9
  208. package/dist/esm/operationsInterfaces/notificationChannels.js.map +7 -1
  209. package/dist/esm/operationsInterfaces/operations.js +0 -9
  210. package/dist/esm/operationsInterfaces/operations.js.map +7 -1
  211. package/dist/esm/operationsInterfaces/policies.js +0 -9
  212. package/dist/esm/operationsInterfaces/policies.js.map +7 -1
  213. package/dist/esm/operationsInterfaces/policySets.js +0 -9
  214. package/dist/esm/operationsInterfaces/policySets.js.map +7 -1
  215. package/dist/esm/operationsInterfaces/providerOperations.js +0 -9
  216. package/dist/esm/operationsInterfaces/providerOperations.js.map +7 -1
  217. package/dist/esm/operationsInterfaces/schedules.js +0 -9
  218. package/dist/esm/operationsInterfaces/schedules.js.map +7 -1
  219. package/dist/esm/operationsInterfaces/secrets.js +0 -9
  220. package/dist/esm/operationsInterfaces/secrets.js.map +7 -1
  221. package/dist/esm/operationsInterfaces/serviceFabricSchedules.js +0 -9
  222. package/dist/esm/operationsInterfaces/serviceFabricSchedules.js.map +7 -1
  223. package/dist/esm/operationsInterfaces/serviceFabrics.js +0 -9
  224. package/dist/esm/operationsInterfaces/serviceFabrics.js.map +7 -1
  225. package/dist/esm/operationsInterfaces/serviceRunners.js +0 -9
  226. package/dist/esm/operationsInterfaces/serviceRunners.js.map +7 -1
  227. package/dist/esm/operationsInterfaces/users.js +0 -9
  228. package/dist/esm/operationsInterfaces/users.js.map +7 -1
  229. package/dist/esm/operationsInterfaces/virtualMachineSchedules.js +0 -9
  230. package/dist/esm/operationsInterfaces/virtualMachineSchedules.js.map +7 -1
  231. package/dist/esm/operationsInterfaces/virtualMachines.js +0 -9
  232. package/dist/esm/operationsInterfaces/virtualMachines.js.map +7 -1
  233. package/dist/esm/operationsInterfaces/virtualNetworks.js +0 -9
  234. package/dist/esm/operationsInterfaces/virtualNetworks.js.map +7 -1
  235. package/dist/esm/pagingHelper.js +17 -28
  236. package/dist/esm/pagingHelper.js.map +7 -1
  237. package/package.json +3 -20
@@ -1,159 +1,175 @@
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.DevTestLabsClient = 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 devTestLabsClient_exports = {};
29
+ __export(devTestLabsClient_exports, {
30
+ DevTestLabsClient: () => DevTestLabsClient
31
+ });
32
+ module.exports = __toCommonJS(devTestLabsClient_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 DevTestLabsClient extends coreClient.ServiceClient {
16
- $host;
17
- apiVersion;
18
- subscriptionId;
19
- /**
20
- * Initializes a new instance of the DevTestLabsClient class.
21
- * @param credentials Subscription credentials which uniquely identify client subscription.
22
- * @param subscriptionId The subscription ID.
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-devtestlabs/4.1.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 || "2018-09-15";
80
- this.providerOperations = new index_js_1.ProviderOperationsImpl(this);
81
- this.labs = new index_js_1.LabsImpl(this);
82
- this.operations = new index_js_1.OperationsImpl(this);
83
- this.globalSchedules = new index_js_1.GlobalSchedulesImpl(this);
84
- this.artifactSources = new index_js_1.ArtifactSourcesImpl(this);
85
- this.armTemplates = new index_js_1.ArmTemplatesImpl(this);
86
- this.artifacts = new index_js_1.ArtifactsImpl(this);
87
- this.costs = new index_js_1.CostsImpl(this);
88
- this.customImages = new index_js_1.CustomImagesImpl(this);
89
- this.formulas = new index_js_1.FormulasImpl(this);
90
- this.galleryImages = new index_js_1.GalleryImagesImpl(this);
91
- this.notificationChannels = new index_js_1.NotificationChannelsImpl(this);
92
- this.policySets = new index_js_1.PolicySetsImpl(this);
93
- this.policies = new index_js_1.PoliciesImpl(this);
94
- this.schedules = new index_js_1.SchedulesImpl(this);
95
- this.serviceRunners = new index_js_1.ServiceRunnersImpl(this);
96
- this.users = new index_js_1.UsersImpl(this);
97
- this.disks = new index_js_1.DisksImpl(this);
98
- this.environments = new index_js_1.EnvironmentsImpl(this);
99
- this.secrets = new index_js_1.SecretsImpl(this);
100
- this.serviceFabrics = new index_js_1.ServiceFabricsImpl(this);
101
- this.serviceFabricSchedules = new index_js_1.ServiceFabricSchedulesImpl(this);
102
- this.virtualMachines = new index_js_1.VirtualMachinesImpl(this);
103
- this.virtualMachineSchedules = new index_js_1.VirtualMachineSchedulesImpl(this);
104
- this.virtualNetworks = new index_js_1.VirtualNetworksImpl(this);
105
- this.addCustomApiVersionPolicy(options.apiVersion);
37
+ $host;
38
+ apiVersion;
39
+ subscriptionId;
40
+ /**
41
+ * Initializes a new instance of the DevTestLabsClient class.
42
+ * @param credentials Subscription credentials which uniquely identify client subscription.
43
+ * @param subscriptionId The subscription ID.
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");
106
49
  }
107
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
108
- addCustomApiVersionPolicy(apiVersion) {
109
- if (!apiVersion) {
110
- return;
111
- }
112
- const apiVersionPolicy = {
113
- name: "CustomApiVersionPolicy",
114
- async sendRequest(request, next) {
115
- const param = request.url.split("?");
116
- if (param.length > 1) {
117
- const newParams = param[1].split("&").map((item) => {
118
- if (item.indexOf("api-version") > -1) {
119
- return "api-version=" + apiVersion;
120
- }
121
- else {
122
- return item;
123
- }
124
- });
125
- request.url = param[0] + "?" + newParams.join("&");
126
- }
127
- return next(request);
128
- }
129
- };
130
- this.pipeline.addPolicy(apiVersionPolicy);
50
+ if (subscriptionId === void 0) {
51
+ throw new Error("'subscriptionId' cannot be null");
131
52
  }
132
- providerOperations;
133
- labs;
134
- operations;
135
- globalSchedules;
136
- artifactSources;
137
- armTemplates;
138
- artifacts;
139
- costs;
140
- customImages;
141
- formulas;
142
- galleryImages;
143
- notificationChannels;
144
- policySets;
145
- policies;
146
- schedules;
147
- serviceRunners;
148
- users;
149
- disks;
150
- environments;
151
- secrets;
152
- serviceFabrics;
153
- serviceFabricSchedules;
154
- virtualMachines;
155
- virtualMachineSchedules;
156
- virtualNetworks;
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-devtestlabs/4.1.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 || "2018-09-15";
95
+ this.providerOperations = new import_operations.ProviderOperationsImpl(this);
96
+ this.labs = new import_operations.LabsImpl(this);
97
+ this.operations = new import_operations.OperationsImpl(this);
98
+ this.globalSchedules = new import_operations.GlobalSchedulesImpl(this);
99
+ this.artifactSources = new import_operations.ArtifactSourcesImpl(this);
100
+ this.armTemplates = new import_operations.ArmTemplatesImpl(this);
101
+ this.artifacts = new import_operations.ArtifactsImpl(this);
102
+ this.costs = new import_operations.CostsImpl(this);
103
+ this.customImages = new import_operations.CustomImagesImpl(this);
104
+ this.formulas = new import_operations.FormulasImpl(this);
105
+ this.galleryImages = new import_operations.GalleryImagesImpl(this);
106
+ this.notificationChannels = new import_operations.NotificationChannelsImpl(this);
107
+ this.policySets = new import_operations.PolicySetsImpl(this);
108
+ this.policies = new import_operations.PoliciesImpl(this);
109
+ this.schedules = new import_operations.SchedulesImpl(this);
110
+ this.serviceRunners = new import_operations.ServiceRunnersImpl(this);
111
+ this.users = new import_operations.UsersImpl(this);
112
+ this.disks = new import_operations.DisksImpl(this);
113
+ this.environments = new import_operations.EnvironmentsImpl(this);
114
+ this.secrets = new import_operations.SecretsImpl(this);
115
+ this.serviceFabrics = new import_operations.ServiceFabricsImpl(this);
116
+ this.serviceFabricSchedules = new import_operations.ServiceFabricSchedulesImpl(this);
117
+ this.virtualMachines = new import_operations.VirtualMachinesImpl(this);
118
+ this.virtualMachineSchedules = new import_operations.VirtualMachineSchedulesImpl(this);
119
+ this.virtualNetworks = new import_operations.VirtualNetworksImpl(this);
120
+ this.addCustomApiVersionPolicy(options.apiVersion);
121
+ }
122
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
123
+ addCustomApiVersionPolicy(apiVersion) {
124
+ if (!apiVersion) {
125
+ return;
126
+ }
127
+ const apiVersionPolicy = {
128
+ name: "CustomApiVersionPolicy",
129
+ async sendRequest(request, next) {
130
+ const param = request.url.split("?");
131
+ if (param.length > 1) {
132
+ const newParams = param[1].split("&").map((item) => {
133
+ if (item.indexOf("api-version") > -1) {
134
+ return "api-version=" + apiVersion;
135
+ } else {
136
+ return item;
137
+ }
138
+ });
139
+ request.url = param[0] + "?" + newParams.join("&");
140
+ }
141
+ return next(request);
142
+ }
143
+ };
144
+ this.pipeline.addPolicy(apiVersionPolicy);
145
+ }
146
+ providerOperations;
147
+ labs;
148
+ operations;
149
+ globalSchedules;
150
+ artifactSources;
151
+ armTemplates;
152
+ artifacts;
153
+ costs;
154
+ customImages;
155
+ formulas;
156
+ galleryImages;
157
+ notificationChannels;
158
+ policySets;
159
+ policies;
160
+ schedules;
161
+ serviceRunners;
162
+ users;
163
+ disks;
164
+ environments;
165
+ secrets;
166
+ serviceFabrics;
167
+ serviceFabricSchedules;
168
+ virtualMachines;
169
+ virtualMachineSchedules;
170
+ virtualNetworks;
157
171
  }
158
- exports.DevTestLabsClient = DevTestLabsClient;
159
- //# sourceMappingURL=devTestLabsClient.js.map
172
+ // Annotate the CommonJS export names for ESM import in node:
173
+ 0 && (module.exports = {
174
+ DevTestLabsClient
175
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"devTestLabsClient.js","sourceRoot":"","sources":["../../src/devTestLabsClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDA0B+B;AA8B/B,MAAa,iBAAkB,SAAQ,UAAU,CAAC,aAAa;IAC7D,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAyC;QAEzC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAA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vKD,8CAuKC","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 ProviderOperationsImpl,\n LabsImpl,\n OperationsImpl,\n GlobalSchedulesImpl,\n ArtifactSourcesImpl,\n ArmTemplatesImpl,\n ArtifactsImpl,\n CostsImpl,\n CustomImagesImpl,\n FormulasImpl,\n GalleryImagesImpl,\n NotificationChannelsImpl,\n PolicySetsImpl,\n PoliciesImpl,\n SchedulesImpl,\n ServiceRunnersImpl,\n UsersImpl,\n DisksImpl,\n EnvironmentsImpl,\n SecretsImpl,\n ServiceFabricsImpl,\n ServiceFabricSchedulesImpl,\n VirtualMachinesImpl,\n VirtualMachineSchedulesImpl,\n VirtualNetworksImpl\n} from \"./operations/index.js\";\nimport {\n ProviderOperations,\n Labs,\n Operations,\n GlobalSchedules,\n ArtifactSources,\n ArmTemplates,\n Artifacts,\n Costs,\n CustomImages,\n Formulas,\n GalleryImages,\n NotificationChannels,\n PolicySets,\n Policies,\n Schedules,\n ServiceRunners,\n Users,\n Disks,\n Environments,\n Secrets,\n ServiceFabrics,\n ServiceFabricSchedules,\n VirtualMachines,\n VirtualMachineSchedules,\n VirtualNetworks\n} from \"./operationsInterfaces/index.js\";\nimport { DevTestLabsClientOptionalParams } from \"./models/index.js\";\n\nexport class DevTestLabsClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the DevTestLabsClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DevTestLabsClientOptionalParams\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: DevTestLabsClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-devtestlabs/4.1.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[] = 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 || \"2018-09-15\";\n this.providerOperations = new ProviderOperationsImpl(this);\n this.labs = new LabsImpl(this);\n this.operations = new OperationsImpl(this);\n this.globalSchedules = new GlobalSchedulesImpl(this);\n this.artifactSources = new ArtifactSourcesImpl(this);\n this.armTemplates = new ArmTemplatesImpl(this);\n this.artifacts = new ArtifactsImpl(this);\n this.costs = new CostsImpl(this);\n this.customImages = new CustomImagesImpl(this);\n this.formulas = new FormulasImpl(this);\n this.galleryImages = new GalleryImagesImpl(this);\n this.notificationChannels = new NotificationChannelsImpl(this);\n this.policySets = new PolicySetsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.schedules = new SchedulesImpl(this);\n this.serviceRunners = new ServiceRunnersImpl(this);\n this.users = new UsersImpl(this);\n this.disks = new DisksImpl(this);\n this.environments = new EnvironmentsImpl(this);\n this.secrets = new SecretsImpl(this);\n this.serviceFabrics = new ServiceFabricsImpl(this);\n this.serviceFabricSchedules = new ServiceFabricSchedulesImpl(this);\n this.virtualMachines = new VirtualMachinesImpl(this);\n this.virtualMachineSchedules = new VirtualMachineSchedulesImpl(this);\n this.virtualNetworks = new VirtualNetworksImpl(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 providerOperations: ProviderOperations;\n labs: Labs;\n operations: Operations;\n globalSchedules: GlobalSchedules;\n artifactSources: ArtifactSources;\n armTemplates: ArmTemplates;\n artifacts: Artifacts;\n costs: Costs;\n customImages: CustomImages;\n formulas: Formulas;\n galleryImages: GalleryImages;\n notificationChannels: NotificationChannels;\n policySets: PolicySets;\n policies: Policies;\n schedules: Schedules;\n serviceRunners: ServiceRunners;\n users: Users;\n disks: Disks;\n environments: Environments;\n secrets: Secrets;\n serviceFabrics: ServiceFabrics;\n serviceFabricSchedules: ServiceFabricSchedules;\n virtualMachines: VirtualMachines;\n virtualMachineSchedules: VirtualMachineSchedules;\n virtualNetworks: VirtualNetworks;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/devtestlabs/arm-devtestlabs/src/devTestLabsClient.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 ProviderOperationsImpl,\n LabsImpl,\n OperationsImpl,\n GlobalSchedulesImpl,\n ArtifactSourcesImpl,\n ArmTemplatesImpl,\n ArtifactsImpl,\n CostsImpl,\n CustomImagesImpl,\n FormulasImpl,\n GalleryImagesImpl,\n NotificationChannelsImpl,\n PolicySetsImpl,\n PoliciesImpl,\n SchedulesImpl,\n ServiceRunnersImpl,\n UsersImpl,\n DisksImpl,\n EnvironmentsImpl,\n SecretsImpl,\n ServiceFabricsImpl,\n ServiceFabricSchedulesImpl,\n VirtualMachinesImpl,\n VirtualMachineSchedulesImpl,\n VirtualNetworksImpl\n} from \"./operations/index.js\";\nimport {\n ProviderOperations,\n Labs,\n Operations,\n GlobalSchedules,\n ArtifactSources,\n ArmTemplates,\n Artifacts,\n Costs,\n CustomImages,\n Formulas,\n GalleryImages,\n NotificationChannels,\n PolicySets,\n Policies,\n Schedules,\n ServiceRunners,\n Users,\n Disks,\n Environments,\n Secrets,\n ServiceFabrics,\n ServiceFabricSchedules,\n VirtualMachines,\n VirtualMachineSchedules,\n VirtualNetworks\n} from \"./operationsInterfaces/index.js\";\nimport { DevTestLabsClientOptionalParams } from \"./models/index.js\";\n\nexport class DevTestLabsClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the DevTestLabsClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DevTestLabsClientOptionalParams\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: DevTestLabsClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-devtestlabs/4.1.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[] = 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 || \"2018-09-15\";\n this.providerOperations = new ProviderOperationsImpl(this);\n this.labs = new LabsImpl(this);\n this.operations = new OperationsImpl(this);\n this.globalSchedules = new GlobalSchedulesImpl(this);\n this.artifactSources = new ArtifactSourcesImpl(this);\n this.armTemplates = new ArmTemplatesImpl(this);\n this.artifacts = new ArtifactsImpl(this);\n this.costs = new CostsImpl(this);\n this.customImages = new CustomImagesImpl(this);\n this.formulas = new FormulasImpl(this);\n this.galleryImages = new GalleryImagesImpl(this);\n this.notificationChannels = new NotificationChannelsImpl(this);\n this.policySets = new PolicySetsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.schedules = new SchedulesImpl(this);\n this.serviceRunners = new ServiceRunnersImpl(this);\n this.users = new UsersImpl(this);\n this.disks = new DisksImpl(this);\n this.environments = new EnvironmentsImpl(this);\n this.secrets = new SecretsImpl(this);\n this.serviceFabrics = new ServiceFabricsImpl(this);\n this.serviceFabricSchedules = new ServiceFabricSchedulesImpl(this);\n this.virtualMachines = new VirtualMachinesImpl(this);\n this.virtualMachineSchedules = new VirtualMachineSchedulesImpl(this);\n this.virtualNetworks = new VirtualNetworksImpl(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 providerOperations: ProviderOperations;\n labs: Labs;\n operations: Operations;\n globalSchedules: GlobalSchedules;\n artifactSources: ArtifactSources;\n armTemplates: ArmTemplates;\n artifacts: Artifacts;\n costs: Costs;\n customImages: CustomImages;\n formulas: Formulas;\n galleryImages: GalleryImages;\n notificationChannels: NotificationChannels;\n policySets: PolicySets;\n policies: Policies;\n schedules: Schedules;\n serviceRunners: ServiceRunners;\n users: Users;\n disks: Disks;\n environments: Environments;\n secrets: Secrets;\n serviceFabrics: ServiceFabrics;\n serviceFabricSchedules: ServiceFabricSchedules;\n virtualMachines: VirtualMachines;\n virtualMachineSchedules: VirtualMachineSchedules;\n virtualNetworks: VirtualNetworks;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,iBAA4B;AAC5B,uBAAkC;AAOlC,wBA0BO;AA8BA,MAAM,0BAA0B,WAAW,cAAc;AAAA,EAC9D;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;AAC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BAAO,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;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
+ "names": []
7
+ }
@@ -1,19 +1,35 @@
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.DevTestLabsClient = 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 devTestLabsClient_js_1 = require("./devTestLabsClient.js");
17
- Object.defineProperty(exports, "DevTestLabsClient", { enumerable: true, get: function () { return devTestLabsClient_js_1.DevTestLabsClient; } });
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
+ DevTestLabsClient: () => import_devTestLabsClient.DevTestLabsClient,
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_devTestLabsClient = require("./devTestLabsClient.js");
28
+ __reExport(src_exports, require("./operationsInterfaces/index.js"), module.exports);
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ DevTestLabsClient,
32
+ getContinuationToken,
33
+ ...require("./models/index.js"),
34
+ ...require("./operationsInterfaces/index.js")
35
+ });
@@ -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,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA;AAC1B,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 { DevTestLabsClient } from \"./devTestLabsClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/devtestlabs/arm-devtestlabs/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 { DevTestLabsClient } from \"./devTestLabsClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,0BAAqC;AACrC,wBAAc,8BAVd;AAWA,+BAAkC;AAClC,wBAAc,4CAZd;",
6
+ "names": []
7
+ }
@@ -1,37 +1,46 @@
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.LroImpl = void 0;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var lroImpl_exports = {};
19
+ __export(lroImpl_exports, {
20
+ LroImpl: () => LroImpl
21
+ });
22
+ module.exports = __toCommonJS(lroImpl_exports);
11
23
  class LroImpl {
12
- sendOperationFn;
13
- args;
14
- spec;
15
- requestPath;
16
- requestMethod;
17
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
18
- this.sendOperationFn = sendOperationFn;
19
- this.args = args;
20
- this.spec = spec;
21
- this.requestPath = requestPath;
22
- this.requestMethod = requestMethod;
23
- }
24
- async sendInitialRequest() {
25
- return this.sendOperationFn(this.args, this.spec);
26
- }
27
- async sendPollRequest(path) {
28
- const { requestBody, ...restSpec } = this.spec;
29
- return this.sendOperationFn(this.args, {
30
- ...restSpec,
31
- path,
32
- httpMethod: "GET"
33
- });
34
- }
24
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
25
+ this.sendOperationFn = sendOperationFn;
26
+ this.args = args;
27
+ this.spec = spec;
28
+ this.requestPath = requestPath;
29
+ this.requestMethod = requestMethod;
30
+ }
31
+ async sendInitialRequest() {
32
+ return this.sendOperationFn(this.args, this.spec);
33
+ }
34
+ async sendPollRequest(path) {
35
+ const { requestBody, ...restSpec } = this.spec;
36
+ return this.sendOperationFn(this.args, {
37
+ ...restSpec,
38
+ path,
39
+ httpMethod: "GET"
40
+ });
41
+ }
35
42
  }
36
- exports.LroImpl = LroImpl;
37
- //# sourceMappingURL=lroImpl.js.map
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ LroImpl
46
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH,MAAa,OAAO;IAER;IACA;IACA;IAKD;IACA;IATT,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;YACrC,GAAG,QAAQ;YACX,IAAI;YACJ,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF;AAvBD,0BAuBC","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 { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/devtestlabs/arm-devtestlabs/src/lroImpl.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 { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,MAAM,QAA8C;AAAA,EACzD,YACU,iBACA,MACA,MAKD,cAAsB,KAAK,MAC3B,gBAAwB,KAAK,YACpC;AATQ;AACA;AACA;AAKD;AACA;AAAA,EACN;AAAA,EACH,MAAa,qBAA8C;AACzD,WAAO,KAAK,gBAAgB,KAAK,MAAM,KAAK,IAAI;AAAA,EAClD;AAAA,EACA,MAAa,gBAAgB,MAAuC;AAClE,UAAM,EAAE,aAAa,GAAG,SAAS,IAAI,KAAK;AAC1C,WAAO,KAAK,gBAAgB,KAAK,MAAM;AAAA,MACrC,GAAG;AAAA,MACH;AAAA,MACA,YAAY;AAAA,IACd,CAAC;AAAA,EACH;AACF;",
6
+ "names": []
7
+ }