@azure/arm-serialconsole 2.1.1-alpha.20250217.1 → 2.1.1-alpha.20250218.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 (223) hide show
  1. package/README.md +21 -12
  2. package/dist/browser/index.d.ts +4 -0
  3. package/dist/browser/index.d.ts.map +1 -0
  4. package/{dist-esm/src → dist/browser}/index.js +3 -3
  5. package/dist/browser/index.js.map +1 -0
  6. package/{dist-esm/src → dist/browser}/microsoftSerialConsoleClient.d.ts +2 -2
  7. package/dist/browser/microsoftSerialConsoleClient.d.ts.map +1 -0
  8. package/{dist-esm/src → dist/browser}/microsoftSerialConsoleClient.js +17 -20
  9. package/dist/browser/microsoftSerialConsoleClient.js.map +1 -0
  10. package/dist/browser/models/index.js.map +1 -0
  11. package/dist/browser/models/mappers.js.map +1 -0
  12. package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
  13. package/dist/browser/models/parameters.js.map +1 -0
  14. package/dist/browser/operations/index.d.ts +2 -0
  15. package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
  16. package/{dist-esm/src → dist/browser}/operations/index.js +1 -1
  17. package/dist/browser/operations/index.js.map +1 -0
  18. package/{dist-esm/src → dist/browser}/operations/serialPorts.d.ts +3 -3
  19. package/dist/browser/operations/serialPorts.d.ts.map +1 -0
  20. package/{dist-esm/src → dist/browser}/operations/serialPorts.js +2 -2
  21. package/dist/browser/operations/serialPorts.js.map +1 -0
  22. package/dist/browser/operationsInterfaces/index.d.ts +2 -0
  23. package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
  24. package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js +1 -1
  25. package/dist/browser/operationsInterfaces/index.js.map +1 -0
  26. package/{dist-esm/src → dist/browser}/operationsInterfaces/serialPorts.d.ts +1 -1
  27. package/dist/browser/operationsInterfaces/serialPorts.d.ts.map +1 -0
  28. package/dist/browser/operationsInterfaces/serialPorts.js.map +1 -0
  29. package/dist/browser/package.json +3 -0
  30. package/dist/commonjs/index.d.ts +4 -0
  31. package/dist/commonjs/index.d.ts.map +1 -0
  32. package/dist/commonjs/index.js +16 -0
  33. package/dist/commonjs/index.js.map +1 -0
  34. package/dist/commonjs/microsoftSerialConsoleClient.d.ts +44 -0
  35. package/dist/commonjs/microsoftSerialConsoleClient.d.ts.map +1 -0
  36. package/dist/commonjs/microsoftSerialConsoleClient.js +211 -0
  37. package/dist/commonjs/microsoftSerialConsoleClient.js.map +1 -0
  38. package/dist/commonjs/models/index.d.ts +151 -0
  39. package/dist/commonjs/models/index.d.ts.map +1 -0
  40. package/dist/commonjs/models/index.js +10 -0
  41. package/dist/commonjs/models/index.js.map +1 -0
  42. package/dist/commonjs/models/mappers.d.ts +16 -0
  43. package/dist/commonjs/models/mappers.d.ts.map +1 -0
  44. package/dist/commonjs/models/mappers.js +288 -0
  45. package/dist/commonjs/models/mappers.js.map +1 -0
  46. package/dist/commonjs/models/parameters.d.ts +14 -0
  47. package/dist/commonjs/models/parameters.d.ts.map +1 -0
  48. package/dist/commonjs/models/parameters.js +131 -0
  49. package/dist/commonjs/models/parameters.js.map +1 -0
  50. package/dist/commonjs/operations/index.d.ts +2 -0
  51. package/dist/commonjs/operations/index.d.ts.map +1 -0
  52. package/dist/commonjs/operations/index.js +12 -0
  53. package/dist/commonjs/operations/index.js.map +1 -0
  54. package/dist/commonjs/operations/serialPorts.d.ts +78 -0
  55. package/dist/commonjs/operations/serialPorts.d.ts.map +1 -0
  56. package/dist/commonjs/operations/serialPorts.js +275 -0
  57. package/dist/commonjs/operations/serialPorts.js.map +1 -0
  58. package/dist/commonjs/operationsInterfaces/index.d.ts +2 -0
  59. package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
  60. package/dist/commonjs/operationsInterfaces/index.js +12 -0
  61. package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
  62. package/dist/commonjs/operationsInterfaces/serialPorts.d.ts +70 -0
  63. package/dist/commonjs/operationsInterfaces/serialPorts.d.ts.map +1 -0
  64. package/dist/commonjs/operationsInterfaces/serialPorts.js +10 -0
  65. package/dist/commonjs/operationsInterfaces/serialPorts.js.map +1 -0
  66. package/dist/commonjs/package.json +3 -0
  67. package/dist/esm/index.d.ts +4 -0
  68. package/dist/esm/index.d.ts.map +1 -0
  69. package/{src/index.ts → dist/esm/index.js} +4 -4
  70. package/dist/esm/index.js.map +1 -0
  71. package/dist/esm/microsoftSerialConsoleClient.d.ts +44 -0
  72. package/dist/esm/microsoftSerialConsoleClient.d.ts.map +1 -0
  73. package/dist/esm/microsoftSerialConsoleClient.js +206 -0
  74. package/dist/esm/microsoftSerialConsoleClient.js.map +1 -0
  75. package/dist/esm/models/index.d.ts +151 -0
  76. package/dist/esm/models/index.d.ts.map +1 -0
  77. package/{src/operations/index.ts → dist/esm/models/index.js} +2 -2
  78. package/dist/esm/models/index.js.map +1 -0
  79. package/dist/esm/models/mappers.d.ts +16 -0
  80. package/dist/esm/models/mappers.d.ts.map +1 -0
  81. package/dist/esm/models/mappers.js +285 -0
  82. package/dist/esm/models/mappers.js.map +1 -0
  83. package/dist/esm/models/parameters.d.ts +14 -0
  84. package/dist/esm/models/parameters.d.ts.map +1 -0
  85. package/dist/esm/models/parameters.js +128 -0
  86. package/dist/esm/models/parameters.js.map +1 -0
  87. package/dist/esm/operations/index.d.ts +2 -0
  88. package/dist/esm/operations/index.d.ts.map +1 -0
  89. package/dist/esm/operations/index.js +9 -0
  90. package/dist/esm/operations/index.js.map +1 -0
  91. package/dist/esm/operations/serialPorts.d.ts +78 -0
  92. package/dist/esm/operations/serialPorts.d.ts.map +1 -0
  93. package/dist/esm/operations/serialPorts.js +270 -0
  94. package/dist/esm/operations/serialPorts.js.map +1 -0
  95. package/dist/esm/operationsInterfaces/index.d.ts +2 -0
  96. package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
  97. package/dist/esm/operationsInterfaces/index.js +9 -0
  98. package/dist/esm/operationsInterfaces/index.js.map +1 -0
  99. package/dist/esm/operationsInterfaces/serialPorts.d.ts +70 -0
  100. package/dist/esm/operationsInterfaces/serialPorts.d.ts.map +1 -0
  101. package/dist/esm/operationsInterfaces/serialPorts.js +9 -0
  102. package/dist/esm/operationsInterfaces/serialPorts.js.map +1 -0
  103. package/dist/esm/package.json +3 -0
  104. package/dist/react-native/index.d.ts +4 -0
  105. package/dist/react-native/index.d.ts.map +1 -0
  106. package/dist/react-native/index.js +11 -0
  107. package/dist/react-native/index.js.map +1 -0
  108. package/dist/react-native/microsoftSerialConsoleClient.d.ts +44 -0
  109. package/dist/react-native/microsoftSerialConsoleClient.d.ts.map +1 -0
  110. package/dist/react-native/microsoftSerialConsoleClient.js +206 -0
  111. package/dist/react-native/microsoftSerialConsoleClient.js.map +1 -0
  112. package/dist/react-native/models/index.d.ts +151 -0
  113. package/dist/react-native/models/index.d.ts.map +1 -0
  114. package/{src/operationsInterfaces/index.ts → dist/react-native/models/index.js} +2 -2
  115. package/dist/react-native/models/index.js.map +1 -0
  116. package/dist/react-native/models/mappers.d.ts +16 -0
  117. package/dist/react-native/models/mappers.d.ts.map +1 -0
  118. package/dist/react-native/models/mappers.js +285 -0
  119. package/dist/react-native/models/mappers.js.map +1 -0
  120. package/dist/react-native/models/parameters.d.ts +14 -0
  121. package/dist/react-native/models/parameters.d.ts.map +1 -0
  122. package/dist/react-native/models/parameters.js +128 -0
  123. package/dist/react-native/models/parameters.js.map +1 -0
  124. package/dist/react-native/operations/index.d.ts +2 -0
  125. package/dist/react-native/operations/index.d.ts.map +1 -0
  126. package/dist/react-native/operations/index.js +9 -0
  127. package/dist/react-native/operations/index.js.map +1 -0
  128. package/dist/react-native/operations/serialPorts.d.ts +78 -0
  129. package/dist/react-native/operations/serialPorts.d.ts.map +1 -0
  130. package/dist/react-native/operations/serialPorts.js +270 -0
  131. package/dist/react-native/operations/serialPorts.js.map +1 -0
  132. package/dist/react-native/operationsInterfaces/index.d.ts +2 -0
  133. package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
  134. package/dist/react-native/operationsInterfaces/index.js +9 -0
  135. package/dist/react-native/operationsInterfaces/index.js.map +1 -0
  136. package/dist/react-native/operationsInterfaces/serialPorts.d.ts +70 -0
  137. package/dist/react-native/operationsInterfaces/serialPorts.d.ts.map +1 -0
  138. package/dist/react-native/operationsInterfaces/serialPorts.js +9 -0
  139. package/dist/react-native/operationsInterfaces/serialPorts.js.map +1 -0
  140. package/dist/react-native/package.json +3 -0
  141. package/package.json +65 -34
  142. package/dist/index.js +0 -930
  143. package/dist/index.js.map +0 -1
  144. package/dist/index.min.js +0 -1
  145. package/dist/index.min.js.map +0 -1
  146. package/dist-esm/samples-dev/disableConsoleSample.d.ts +0 -2
  147. package/dist-esm/samples-dev/disableConsoleSample.d.ts.map +0 -1
  148. package/dist-esm/samples-dev/disableConsoleSample.js +0 -28
  149. package/dist-esm/samples-dev/disableConsoleSample.js.map +0 -1
  150. package/dist-esm/samples-dev/enableConsoleSample.d.ts +0 -2
  151. package/dist-esm/samples-dev/enableConsoleSample.d.ts.map +0 -1
  152. package/dist-esm/samples-dev/enableConsoleSample.js +0 -28
  153. package/dist-esm/samples-dev/enableConsoleSample.js.map +0 -1
  154. package/dist-esm/samples-dev/getConsoleStatusSample.d.ts +0 -2
  155. package/dist-esm/samples-dev/getConsoleStatusSample.d.ts.map +0 -1
  156. package/dist-esm/samples-dev/getConsoleStatusSample.js +0 -28
  157. package/dist-esm/samples-dev/getConsoleStatusSample.js.map +0 -1
  158. package/dist-esm/samples-dev/listOperationsSample.d.ts +0 -2
  159. package/dist-esm/samples-dev/listOperationsSample.d.ts.map +0 -1
  160. package/dist-esm/samples-dev/listOperationsSample.js +0 -27
  161. package/dist-esm/samples-dev/listOperationsSample.js.map +0 -1
  162. package/dist-esm/samples-dev/serialPortsConnectSample.d.ts +0 -2
  163. package/dist-esm/samples-dev/serialPortsConnectSample.d.ts.map +0 -1
  164. package/dist-esm/samples-dev/serialPortsConnectSample.js +0 -53
  165. package/dist-esm/samples-dev/serialPortsConnectSample.js.map +0 -1
  166. package/dist-esm/samples-dev/serialPortsCreateSample.d.ts +0 -2
  167. package/dist-esm/samples-dev/serialPortsCreateSample.d.ts.map +0 -1
  168. package/dist-esm/samples-dev/serialPortsCreateSample.js +0 -26
  169. package/dist-esm/samples-dev/serialPortsCreateSample.js.map +0 -1
  170. package/dist-esm/samples-dev/serialPortsDeleteSample.d.ts +0 -2
  171. package/dist-esm/samples-dev/serialPortsDeleteSample.d.ts.map +0 -1
  172. package/dist-esm/samples-dev/serialPortsDeleteSample.js +0 -32
  173. package/dist-esm/samples-dev/serialPortsDeleteSample.js.map +0 -1
  174. package/dist-esm/samples-dev/serialPortsGetSample.d.ts +0 -2
  175. package/dist-esm/samples-dev/serialPortsGetSample.d.ts.map +0 -1
  176. package/dist-esm/samples-dev/serialPortsGetSample.js +0 -32
  177. package/dist-esm/samples-dev/serialPortsGetSample.js.map +0 -1
  178. package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.d.ts +0 -2
  179. package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.d.ts.map +0 -1
  180. package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.js +0 -27
  181. package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.js.map +0 -1
  182. package/dist-esm/samples-dev/serialPortsListSample.d.ts +0 -2
  183. package/dist-esm/samples-dev/serialPortsListSample.d.ts.map +0 -1
  184. package/dist-esm/samples-dev/serialPortsListSample.js +0 -31
  185. package/dist-esm/samples-dev/serialPortsListSample.js.map +0 -1
  186. package/dist-esm/src/index.d.ts +0 -4
  187. package/dist-esm/src/index.d.ts.map +0 -1
  188. package/dist-esm/src/index.js.map +0 -1
  189. package/dist-esm/src/microsoftSerialConsoleClient.d.ts.map +0 -1
  190. package/dist-esm/src/microsoftSerialConsoleClient.js.map +0 -1
  191. package/dist-esm/src/models/index.js.map +0 -1
  192. package/dist-esm/src/models/mappers.js.map +0 -1
  193. package/dist-esm/src/models/parameters.js.map +0 -1
  194. package/dist-esm/src/operations/index.d.ts +0 -2
  195. package/dist-esm/src/operations/index.js.map +0 -1
  196. package/dist-esm/src/operations/serialPorts.d.ts.map +0 -1
  197. package/dist-esm/src/operations/serialPorts.js.map +0 -1
  198. package/dist-esm/src/operationsInterfaces/index.d.ts +0 -2
  199. package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
  200. package/dist-esm/src/operationsInterfaces/serialPorts.d.ts.map +0 -1
  201. package/dist-esm/src/operationsInterfaces/serialPorts.js.map +0 -1
  202. package/dist-esm/test/sampleTest.d.ts +0 -2
  203. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  204. package/dist-esm/test/sampleTest.js +0 -42
  205. package/dist-esm/test/sampleTest.js.map +0 -1
  206. package/src/microsoftSerialConsoleClient.ts +0 -287
  207. package/src/models/index.ts +0 -193
  208. package/src/models/mappers.ts +0 -305
  209. package/src/models/parameters.ts +0 -145
  210. package/src/operations/serialPorts.ts +0 -357
  211. package/src/operationsInterfaces/serialPorts.ts +0 -128
  212. package/tsconfig.json +0 -33
  213. package/types/arm-serialconsole.d.ts +0 -297
  214. /package/{dist-esm/src → dist/browser}/models/index.d.ts +0 -0
  215. /package/{dist-esm/src → dist/browser}/models/index.d.ts.map +0 -0
  216. /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
  217. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
  218. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
  219. /package/{dist-esm/src → dist/browser}/models/mappers.js +0 -0
  220. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
  221. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
  222. /package/{dist-esm/src → dist/browser}/operationsInterfaces/serialPorts.js +0 -0
  223. /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
@@ -0,0 +1,206 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import * as coreClient from "@azure/core-client";
9
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
+ import { SerialPortsImpl } from "./operations/index.js";
11
+ import * as Parameters from "./models/parameters.js";
12
+ import * as Mappers from "./models/mappers.js";
13
+ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
14
+ /**
15
+ * Initializes a new instance of the MicrosoftSerialConsoleClient class.
16
+ * @param credentials Subscription credentials which uniquely identify client subscription.
17
+ * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.
18
+ * The subscription ID forms part of the URI for every service call requiring it.
19
+ * @param options The parameter options
20
+ */
21
+ constructor(credentials, subscriptionId, options) {
22
+ var _a, _b, _c;
23
+ if (credentials === undefined) {
24
+ throw new Error("'credentials' cannot be null");
25
+ }
26
+ if (subscriptionId === undefined) {
27
+ throw new Error("'subscriptionId' cannot be null");
28
+ }
29
+ // Initializing default values for options
30
+ if (!options) {
31
+ options = {};
32
+ }
33
+ const defaults = {
34
+ requestContentType: "application/json; charset=utf-8",
35
+ credential: credentials
36
+ };
37
+ const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;
38
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
39
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
40
+ : `${packageDetails}`;
41
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
42
+ userAgentPrefix
43
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
44
+ super(optionsWithDefaults);
45
+ let bearerTokenAuthenticationPolicyFound = false;
46
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
47
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
48
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
49
+ coreRestPipeline.bearerTokenAuthenticationPolicyName);
50
+ }
51
+ if (!options ||
52
+ !options.pipeline ||
53
+ options.pipeline.getOrderedPolicies().length == 0 ||
54
+ !bearerTokenAuthenticationPolicyFound) {
55
+ this.pipeline.removePolicy({
56
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
57
+ });
58
+ this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
59
+ credential: credentials,
60
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
61
+ challengeCallbacks: {
62
+ authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
63
+ }
64
+ }));
65
+ }
66
+ // Parameter assignments
67
+ this.subscriptionId = subscriptionId;
68
+ // Assigning values to Constant parameters
69
+ this.$host = options.$host || "https://management.azure.com";
70
+ this.apiVersion = options.apiVersion || "2018-05-01";
71
+ this.serialPorts = new SerialPortsImpl(this);
72
+ this.addCustomApiVersionPolicy(options.apiVersion);
73
+ }
74
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
75
+ addCustomApiVersionPolicy(apiVersion) {
76
+ if (!apiVersion) {
77
+ return;
78
+ }
79
+ const apiVersionPolicy = {
80
+ name: "CustomApiVersionPolicy",
81
+ async sendRequest(request, next) {
82
+ const param = request.url.split("?");
83
+ if (param.length > 1) {
84
+ const newParams = param[1].split("&").map((item) => {
85
+ if (item.indexOf("api-version") > -1) {
86
+ return "api-version=" + apiVersion;
87
+ }
88
+ else {
89
+ return item;
90
+ }
91
+ });
92
+ request.url = param[0] + "?" + newParams.join("&");
93
+ }
94
+ return next(request);
95
+ }
96
+ };
97
+ this.pipeline.addPolicy(apiVersionPolicy);
98
+ }
99
+ /**
100
+ * Gets a list of Serial Console API operations.
101
+ * @param options The options parameters.
102
+ */
103
+ listOperations(options) {
104
+ return this.sendOperationRequest({ options }, listOperationsOperationSpec);
105
+ }
106
+ /**
107
+ * Gets whether or not Serial Console is disabled for a given subscription
108
+ * @param defaultParam Default parameter. Leave the value as "default".
109
+ * @param options The options parameters.
110
+ */
111
+ getConsoleStatus(defaultParam, options) {
112
+ return this.sendOperationRequest({ defaultParam, options }, getConsoleStatusOperationSpec);
113
+ }
114
+ /**
115
+ * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription
116
+ * @param defaultParam Default parameter. Leave the value as "default".
117
+ * @param options The options parameters.
118
+ */
119
+ disableConsole(defaultParam, options) {
120
+ return this.sendOperationRequest({ defaultParam, options }, disableConsoleOperationSpec);
121
+ }
122
+ /**
123
+ * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription
124
+ * @param defaultParam Default parameter. Leave the value as "default".
125
+ * @param options The options parameters.
126
+ */
127
+ enableConsole(defaultParam, options) {
128
+ return this.sendOperationRequest({ defaultParam, options }, enableConsoleOperationSpec);
129
+ }
130
+ }
131
+ // Operation Specifications
132
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
133
+ const listOperationsOperationSpec = {
134
+ path: "/providers/Microsoft.SerialConsole/operations",
135
+ httpMethod: "GET",
136
+ responses: {
137
+ 200: {
138
+ bodyMapper: Mappers.SerialConsoleOperations
139
+ }
140
+ },
141
+ queryParameters: [Parameters.apiVersion],
142
+ urlParameters: [Parameters.$host],
143
+ headerParameters: [Parameters.accept],
144
+ serializer
145
+ };
146
+ const getConsoleStatusOperationSpec = {
147
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}",
148
+ httpMethod: "GET",
149
+ responses: {
150
+ 200: {
151
+ bodyMapper: Mappers.SerialConsoleStatus
152
+ },
153
+ 404: {
154
+ bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound
155
+ }
156
+ },
157
+ queryParameters: [Parameters.apiVersion],
158
+ urlParameters: [
159
+ Parameters.$host,
160
+ Parameters.subscriptionId,
161
+ Parameters.defaultParam
162
+ ],
163
+ headerParameters: [Parameters.accept],
164
+ serializer
165
+ };
166
+ const disableConsoleOperationSpec = {
167
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole",
168
+ httpMethod: "POST",
169
+ responses: {
170
+ 200: {
171
+ bodyMapper: Mappers.DisableSerialConsoleResult
172
+ },
173
+ 404: {
174
+ bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound
175
+ }
176
+ },
177
+ queryParameters: [Parameters.apiVersion],
178
+ urlParameters: [
179
+ Parameters.$host,
180
+ Parameters.subscriptionId,
181
+ Parameters.defaultParam
182
+ ],
183
+ headerParameters: [Parameters.accept],
184
+ serializer
185
+ };
186
+ const enableConsoleOperationSpec = {
187
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole",
188
+ httpMethod: "POST",
189
+ responses: {
190
+ 200: {
191
+ bodyMapper: Mappers.EnableSerialConsoleResult
192
+ },
193
+ 404: {
194
+ bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound
195
+ }
196
+ },
197
+ queryParameters: [Parameters.apiVersion],
198
+ urlParameters: [
199
+ Parameters.$host,
200
+ Parameters.subscriptionId,
201
+ Parameters.defaultParam
202
+ ],
203
+ headerParameters: [Parameters.accept],
204
+ serializer
205
+ };
206
+ //# sourceMappingURL=microsoftSerialConsoleClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AA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D;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\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: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\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-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -0,0 +1,151 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ /** Serial Console operations */
3
+ export interface SerialConsoleOperations {
4
+ /** A list of Serial Console operations */
5
+ value?: SerialConsoleOperationsValueItem[];
6
+ }
7
+ export interface SerialConsoleOperationsValueItem {
8
+ name?: string;
9
+ isDataAction?: string;
10
+ display?: SerialConsoleOperationsValueItemDisplay;
11
+ }
12
+ export interface SerialConsoleOperationsValueItemDisplay {
13
+ provider?: string;
14
+ resource?: string;
15
+ operation?: string;
16
+ description?: string;
17
+ }
18
+ /** Returns whether or not Serial Console is disabled. */
19
+ export interface SerialConsoleStatus {
20
+ /** Whether or not Serial Console is disabled. */
21
+ disabled?: boolean;
22
+ }
23
+ /** Error saying that the provided subscription could not be found */
24
+ export interface GetSerialConsoleSubscriptionNotFound {
25
+ /** Error code */
26
+ code?: string;
27
+ /** Subscription not found message */
28
+ message?: string;
29
+ }
30
+ /** Returns whether or not Serial Console is disabled. */
31
+ export interface DisableSerialConsoleResult {
32
+ /** Whether or not Serial Console is disabled. */
33
+ disabled?: boolean;
34
+ }
35
+ /** Returns whether or not Serial Console is disabled (enabled). */
36
+ export interface EnableSerialConsoleResult {
37
+ /** Whether or not Serial Console is disabled (enabled). */
38
+ disabled?: boolean;
39
+ }
40
+ /** The list serial ports operation response. */
41
+ export interface SerialPortListResult {
42
+ /** The list of serial ports. */
43
+ value?: SerialPort[];
44
+ }
45
+ /** The Resource model definition. */
46
+ export interface Resource {
47
+ /**
48
+ * Resource Id
49
+ * NOTE: This property will not be serialized. It can only be populated by the server.
50
+ */
51
+ readonly id?: string;
52
+ /**
53
+ * Resource name
54
+ * NOTE: This property will not be serialized. It can only be populated by the server.
55
+ */
56
+ readonly name?: string;
57
+ /**
58
+ * Resource type
59
+ * NOTE: This property will not be serialized. It can only be populated by the server.
60
+ */
61
+ readonly type?: string;
62
+ }
63
+ /** An error response from the service. */
64
+ export interface CloudError {
65
+ /** Cloud error body. */
66
+ error?: CloudErrorBody;
67
+ }
68
+ /** An error response from the Batch service. */
69
+ export interface CloudErrorBody {
70
+ /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */
71
+ code?: string;
72
+ /** A message describing the error, intended to be suitable for display in a user interface. */
73
+ message?: string;
74
+ /** The target of the particular error. For example, the name of the property in error. */
75
+ target?: string;
76
+ /** A list of additional details about the error. */
77
+ details?: CloudErrorBody[];
78
+ }
79
+ /** Returns a connection string to the serial port of the resource. */
80
+ export interface SerialPortConnectResult {
81
+ /** Connection string to the serial port of the resource. */
82
+ connectionString?: string;
83
+ }
84
+ /** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */
85
+ export interface ProxyResource extends Resource {
86
+ }
87
+ /** Represents the serial port of the parent resource. */
88
+ export interface SerialPort extends ProxyResource {
89
+ /** Specifies whether the port is enabled for a serial console connection. */
90
+ state?: SerialPortState;
91
+ }
92
+ /** Defines values for SerialPortState. */
93
+ export type SerialPortState = "enabled" | "disabled";
94
+ /** Optional parameters. */
95
+ export interface ListOperationsOptionalParams extends coreClient.OperationOptions {
96
+ }
97
+ /** Contains response data for the listOperations operation. */
98
+ export type ListOperationsResponse = SerialConsoleOperations;
99
+ /** Optional parameters. */
100
+ export interface GetConsoleStatusOptionalParams extends coreClient.OperationOptions {
101
+ }
102
+ /** Contains response data for the getConsoleStatus operation. */
103
+ export type GetConsoleStatusResponse = SerialConsoleStatus;
104
+ /** Optional parameters. */
105
+ export interface DisableConsoleOptionalParams extends coreClient.OperationOptions {
106
+ }
107
+ /** Contains response data for the disableConsole operation. */
108
+ export type DisableConsoleResponse = DisableSerialConsoleResult;
109
+ /** Optional parameters. */
110
+ export interface EnableConsoleOptionalParams extends coreClient.OperationOptions {
111
+ }
112
+ /** Contains response data for the enableConsole operation. */
113
+ export type EnableConsoleResponse = EnableSerialConsoleResult;
114
+ /** Optional parameters. */
115
+ export interface SerialPortsListOptionalParams extends coreClient.OperationOptions {
116
+ }
117
+ /** Contains response data for the list operation. */
118
+ export type SerialPortsListResponse = SerialPortListResult;
119
+ /** Optional parameters. */
120
+ export interface SerialPortsGetOptionalParams extends coreClient.OperationOptions {
121
+ }
122
+ /** Contains response data for the get operation. */
123
+ export type SerialPortsGetResponse = SerialPort;
124
+ /** Optional parameters. */
125
+ export interface SerialPortsCreateOptionalParams extends coreClient.OperationOptions {
126
+ }
127
+ /** Contains response data for the create operation. */
128
+ export type SerialPortsCreateResponse = SerialPort;
129
+ /** Optional parameters. */
130
+ export interface SerialPortsDeleteOptionalParams extends coreClient.OperationOptions {
131
+ }
132
+ /** Optional parameters. */
133
+ export interface SerialPortsListBySubscriptionsOptionalParams extends coreClient.OperationOptions {
134
+ }
135
+ /** Contains response data for the listBySubscriptions operation. */
136
+ export type SerialPortsListBySubscriptionsResponse = SerialPortListResult;
137
+ /** Optional parameters. */
138
+ export interface SerialPortsConnectOptionalParams extends coreClient.OperationOptions {
139
+ }
140
+ /** Contains response data for the connect operation. */
141
+ export type SerialPortsConnectResponse = SerialPortConnectResult;
142
+ /** Optional parameters. */
143
+ export interface MicrosoftSerialConsoleClientOptionalParams extends coreClient.ServiceClientOptions {
144
+ /** server parameter */
145
+ $host?: string;
146
+ /** Api Version */
147
+ apiVersion?: string;
148
+ /** Overrides client endpoint. */
149
+ endpoint?: string;
150
+ }
151
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,gCAAgC;AAChC,MAAM,WAAW,uBAAuB;IACtC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,gCAAgC;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,uCAAuC,CAAC;CACnD;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,yDAAyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,qEAAqE;AACrE,MAAM,WAAW,oCAAoC;IACnD,iBAAiB;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yDAAyD;AACzD,MAAM,WAAW,0BAA0B;IACzC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,WAAW,yBAAyB;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gDAAgD;AAChD,MAAM,WAAW,oBAAoB;IACnC,gCAAgC;IAChC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,qCAAqC;AACrC,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB;;;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A2B;AAC3B,MAAM,WAAW,2BACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,8DAA8D;AAC9D,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AAE9D,2BAA2B;AAC3B,MAAM,WAAW,6BACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,qDAAqD;AACrD,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D,2BAA2B;AAC3B,MAAM,WAAW,4BACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,oDAAoD;AACpD,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC;AAEhD,2BAA2B;AAC3B,MAAM,WAAW,+BACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,uDAAuD;AACvD,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC;AAEnD,2BAA2B;AAC3B,MAAM,WAAW,+BACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,2BAA2B;AAC3B,MAAM,WAAW,4CACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,oEAAoE;AACpE,MAAM,MAAM,sCAAsC,GAAG,oBAAoB,CAAC;AAE1E,2BAA2B;AAC3B,MAAM,WAAW,gCACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,wDAAwD;AACxD,MAAM,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AAEjE,2BAA2B;AAC3B,MAAM,WAAW,0CACf,SAAQ,UAAU,CAAC,oBAAoB;IACvC,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -5,5 +5,5 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
-
9
- export * from "./serialPorts";
8
+ export {};
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","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\";\n\n/** Serial Console operations */\nexport interface SerialConsoleOperations {\n /** A list of Serial Console operations */\n value?: SerialConsoleOperationsValueItem[];\n}\n\nexport interface SerialConsoleOperationsValueItem {\n name?: string;\n isDataAction?: string;\n display?: SerialConsoleOperationsValueItemDisplay;\n}\n\nexport interface SerialConsoleOperationsValueItemDisplay {\n provider?: string;\n resource?: string;\n operation?: string;\n description?: string;\n}\n\n/** Returns whether or not Serial Console is disabled. */\nexport interface SerialConsoleStatus {\n /** Whether or not Serial Console is disabled. */\n disabled?: boolean;\n}\n\n/** Error saying that the provided subscription could not be found */\nexport interface GetSerialConsoleSubscriptionNotFound {\n /** Error code */\n code?: string;\n /** Subscription not found message */\n message?: string;\n}\n\n/** Returns whether or not Serial Console is disabled. */\nexport interface DisableSerialConsoleResult {\n /** Whether or not Serial Console is disabled. */\n disabled?: boolean;\n}\n\n/** Returns whether or not Serial Console is disabled (enabled). */\nexport interface EnableSerialConsoleResult {\n /** Whether or not Serial Console is disabled (enabled). */\n disabled?: boolean;\n}\n\n/** The list serial ports operation response. */\nexport interface SerialPortListResult {\n /** The list of serial ports. */\n value?: SerialPort[];\n}\n\n/** The Resource model definition. */\nexport interface Resource {\n /**\n * Resource Id\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly id?: string;\n /**\n * Resource name\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly name?: string;\n /**\n * Resource type\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly type?: string;\n}\n\n/** An error response from the service. */\nexport interface CloudError {\n /** Cloud error body. */\n error?: CloudErrorBody;\n}\n\n/** An error response from the Batch service. */\nexport interface CloudErrorBody {\n /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */\n code?: string;\n /** A message describing the error, intended to be suitable for display in a user interface. */\n message?: string;\n /** The target of the particular error. For example, the name of the property in error. */\n target?: string;\n /** A list of additional details about the error. */\n details?: CloudErrorBody[];\n}\n\n/** Returns a connection string to the serial port of the resource. */\nexport interface SerialPortConnectResult {\n /** Connection string to the serial port of the resource. */\n connectionString?: string;\n}\n\n/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */\nexport interface ProxyResource extends Resource {}\n\n/** Represents the serial port of the parent resource. */\nexport interface SerialPort extends ProxyResource {\n /** Specifies whether the port is enabled for a serial console connection. */\n state?: SerialPortState;\n}\n\n/** Defines values for SerialPortState. */\nexport type SerialPortState = \"enabled\" | \"disabled\";\n\n/** Optional parameters. */\nexport interface ListOperationsOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the listOperations operation. */\nexport type ListOperationsResponse = SerialConsoleOperations;\n\n/** Optional parameters. */\nexport interface GetConsoleStatusOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the getConsoleStatus operation. */\nexport type GetConsoleStatusResponse = SerialConsoleStatus;\n\n/** Optional parameters. */\nexport interface DisableConsoleOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the disableConsole operation. */\nexport type DisableConsoleResponse = DisableSerialConsoleResult;\n\n/** Optional parameters. */\nexport interface EnableConsoleOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the enableConsole operation. */\nexport type EnableConsoleResponse = EnableSerialConsoleResult;\n\n/** Optional parameters. */\nexport interface SerialPortsListOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the list operation. */\nexport type SerialPortsListResponse = SerialPortListResult;\n\n/** Optional parameters. */\nexport interface SerialPortsGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type SerialPortsGetResponse = SerialPort;\n\n/** Optional parameters. */\nexport interface SerialPortsCreateOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the create operation. */\nexport type SerialPortsCreateResponse = SerialPort;\n\n/** Optional parameters. */\nexport interface SerialPortsDeleteOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Optional parameters. */\nexport interface SerialPortsListBySubscriptionsOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the listBySubscriptions operation. */\nexport type SerialPortsListBySubscriptionsResponse = SerialPortListResult;\n\n/** Optional parameters. */\nexport interface SerialPortsConnectOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the connect operation. */\nexport type SerialPortsConnectResponse = SerialPortConnectResult;\n\n/** Optional parameters. */\nexport interface MicrosoftSerialConsoleClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** server parameter */\n $host?: string;\n /** Api Version */\n apiVersion?: string;\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ export declare const SerialConsoleOperations: coreClient.CompositeMapper;
3
+ export declare const SerialConsoleOperationsValueItem: coreClient.CompositeMapper;
4
+ export declare const SerialConsoleOperationsValueItemDisplay: coreClient.CompositeMapper;
5
+ export declare const SerialConsoleStatus: coreClient.CompositeMapper;
6
+ export declare const GetSerialConsoleSubscriptionNotFound: coreClient.CompositeMapper;
7
+ export declare const DisableSerialConsoleResult: coreClient.CompositeMapper;
8
+ export declare const EnableSerialConsoleResult: coreClient.CompositeMapper;
9
+ export declare const SerialPortListResult: coreClient.CompositeMapper;
10
+ export declare const Resource: coreClient.CompositeMapper;
11
+ export declare const CloudError: coreClient.CompositeMapper;
12
+ export declare const CloudErrorBody: coreClient.CompositeMapper;
13
+ export declare const SerialPortConnectResult: coreClient.CompositeMapper;
14
+ export declare const ProxyResource: coreClient.CompositeMapper;
15
+ export declare const SerialPort: coreClient.CompositeMapper;
16
+ //# sourceMappingURL=mappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,eAmBhD,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,UAAU,CAAC,eA0BzD,CAAC;AAEF,eAAO,MAAM,uCAAuC,EAAE,UAAU,CAAC,eA+BhE,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eAa5C,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,UAAU,CAAC,eAmB7D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,UAAU,CAAC,eAanD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,eAalD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,eAmB7C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,UAAU,CAAC,eA4BjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eAcnC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,eAqCvC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,eAahD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eAQtC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eAenC,CAAC"}