@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.
- package/README.md +21 -12
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/index.js +3 -3
- package/dist/browser/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/microsoftSerialConsoleClient.d.ts +2 -2
- package/dist/browser/microsoftSerialConsoleClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/microsoftSerialConsoleClient.js +17 -20
- package/dist/browser/microsoftSerialConsoleClient.js.map +1 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/mappers.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
- package/dist/browser/models/parameters.js.map +1 -0
- package/dist/browser/operations/index.d.ts +2 -0
- package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operations/index.js +1 -1
- package/dist/browser/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/serialPorts.d.ts +3 -3
- package/dist/browser/operations/serialPorts.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/serialPorts.js +2 -2
- package/dist/browser/operations/serialPorts.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +2 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js +1 -1
- package/dist/browser/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/serialPorts.d.ts +1 -1
- package/dist/browser/operationsInterfaces/serialPorts.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/serialPorts.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +16 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/microsoftSerialConsoleClient.d.ts +44 -0
- package/dist/commonjs/microsoftSerialConsoleClient.d.ts.map +1 -0
- package/dist/commonjs/microsoftSerialConsoleClient.js +211 -0
- package/dist/commonjs/microsoftSerialConsoleClient.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +151 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +10 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +16 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +288 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +14 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +131 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +2 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -0
- package/dist/commonjs/operations/index.js +12 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/dist/commonjs/operations/serialPorts.d.ts +78 -0
- package/dist/commonjs/operations/serialPorts.d.ts.map +1 -0
- package/dist/commonjs/operations/serialPorts.js +275 -0
- package/dist/commonjs/operations/serialPorts.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.js +12 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/serialPorts.d.ts +70 -0
- package/dist/commonjs/operationsInterfaces/serialPorts.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/serialPorts.js +10 -0
- package/dist/commonjs/operationsInterfaces/serialPorts.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{src/index.ts → dist/esm/index.js} +4 -4
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/microsoftSerialConsoleClient.d.ts +44 -0
- package/dist/esm/microsoftSerialConsoleClient.d.ts.map +1 -0
- package/dist/esm/microsoftSerialConsoleClient.js +206 -0
- package/dist/esm/microsoftSerialConsoleClient.js.map +1 -0
- package/dist/esm/models/index.d.ts +151 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/{src/operations/index.ts → dist/esm/models/index.js} +2 -2
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +16 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/esm/models/mappers.js +285 -0
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +14 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +128 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/index.d.ts +2 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/dist/esm/operations/index.js +9 -0
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/serialPorts.d.ts +78 -0
- package/dist/esm/operations/serialPorts.d.ts.map +1 -0
- package/dist/esm/operations/serialPorts.js +270 -0
- package/dist/esm/operations/serialPorts.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/index.js +9 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/serialPorts.d.ts +70 -0
- package/dist/esm/operationsInterfaces/serialPorts.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/serialPorts.js +9 -0
- package/dist/esm/operationsInterfaces/serialPorts.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/react-native/index.d.ts +4 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +11 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/microsoftSerialConsoleClient.d.ts +44 -0
- package/dist/react-native/microsoftSerialConsoleClient.d.ts.map +1 -0
- package/dist/react-native/microsoftSerialConsoleClient.js +206 -0
- package/dist/react-native/microsoftSerialConsoleClient.js.map +1 -0
- package/dist/react-native/models/index.d.ts +151 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/{src/operationsInterfaces/index.ts → dist/react-native/models/index.js} +2 -2
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +16 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +285 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +14 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +128 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +2 -0
- package/dist/react-native/operations/index.d.ts.map +1 -0
- package/dist/react-native/operations/index.js +9 -0
- package/dist/react-native/operations/index.js.map +1 -0
- package/dist/react-native/operations/serialPorts.d.ts +78 -0
- package/dist/react-native/operations/serialPorts.d.ts.map +1 -0
- package/dist/react-native/operations/serialPorts.js +270 -0
- package/dist/react-native/operations/serialPorts.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/index.js +9 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/operationsInterfaces/serialPorts.d.ts +70 -0
- package/dist/react-native/operationsInterfaces/serialPorts.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/serialPorts.js +9 -0
- package/dist/react-native/operationsInterfaces/serialPorts.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/package.json +65 -34
- package/dist/index.js +0 -930
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/disableConsoleSample.d.ts +0 -2
- package/dist-esm/samples-dev/disableConsoleSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/disableConsoleSample.js +0 -28
- package/dist-esm/samples-dev/disableConsoleSample.js.map +0 -1
- package/dist-esm/samples-dev/enableConsoleSample.d.ts +0 -2
- package/dist-esm/samples-dev/enableConsoleSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/enableConsoleSample.js +0 -28
- package/dist-esm/samples-dev/enableConsoleSample.js.map +0 -1
- package/dist-esm/samples-dev/getConsoleStatusSample.d.ts +0 -2
- package/dist-esm/samples-dev/getConsoleStatusSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/getConsoleStatusSample.js +0 -28
- package/dist-esm/samples-dev/getConsoleStatusSample.js.map +0 -1
- package/dist-esm/samples-dev/listOperationsSample.d.ts +0 -2
- package/dist-esm/samples-dev/listOperationsSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/listOperationsSample.js +0 -27
- package/dist-esm/samples-dev/listOperationsSample.js.map +0 -1
- package/dist-esm/samples-dev/serialPortsConnectSample.d.ts +0 -2
- package/dist-esm/samples-dev/serialPortsConnectSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/serialPortsConnectSample.js +0 -53
- package/dist-esm/samples-dev/serialPortsConnectSample.js.map +0 -1
- package/dist-esm/samples-dev/serialPortsCreateSample.d.ts +0 -2
- package/dist-esm/samples-dev/serialPortsCreateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/serialPortsCreateSample.js +0 -26
- package/dist-esm/samples-dev/serialPortsCreateSample.js.map +0 -1
- package/dist-esm/samples-dev/serialPortsDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/serialPortsDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/serialPortsDeleteSample.js +0 -32
- package/dist-esm/samples-dev/serialPortsDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/serialPortsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/serialPortsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/serialPortsGetSample.js +0 -32
- package/dist-esm/samples-dev/serialPortsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.d.ts +0 -2
- package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.js +0 -27
- package/dist-esm/samples-dev/serialPortsListBySubscriptionsSample.js.map +0 -1
- package/dist-esm/samples-dev/serialPortsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/serialPortsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/serialPortsListSample.js +0 -31
- package/dist-esm/samples-dev/serialPortsListSample.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -4
- package/dist-esm/src/index.d.ts.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/microsoftSerialConsoleClient.d.ts.map +0 -1
- package/dist-esm/src/microsoftSerialConsoleClient.js.map +0 -1
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/index.d.ts +0 -2
- package/dist-esm/src/operations/index.js.map +0 -1
- package/dist-esm/src/operations/serialPorts.d.ts.map +0 -1
- package/dist-esm/src/operations/serialPorts.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +0 -2
- package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/serialPorts.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/serialPorts.js.map +0 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -42
- package/dist-esm/test/sampleTest.js.map +0 -1
- package/src/microsoftSerialConsoleClient.ts +0 -287
- package/src/models/index.ts +0 -193
- package/src/models/mappers.ts +0 -305
- package/src/models/parameters.ts +0 -145
- package/src/operations/serialPorts.ts +0 -357
- package/src/operationsInterfaces/serialPorts.ts +0 -128
- package/tsconfig.json +0 -33
- package/types/arm-serialconsole.d.ts +0 -297
- /package/{dist-esm/src → dist/browser}/models/index.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/index.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/serialPorts.js +0 -0
- /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
package/dist/index.js
DELETED
|
@@ -1,930 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tslib = require('tslib');
|
|
6
|
-
var coreClient = require('@azure/core-client');
|
|
7
|
-
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
8
|
-
|
|
9
|
-
function _interopNamespaceDefault(e) {
|
|
10
|
-
var n = Object.create(null);
|
|
11
|
-
if (e) {
|
|
12
|
-
Object.keys(e).forEach(function (k) {
|
|
13
|
-
if (k !== 'default') {
|
|
14
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return e[k]; }
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
n.default = e;
|
|
23
|
-
return Object.freeze(n);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
|
|
27
|
-
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespaceDefault(coreRestPipeline);
|
|
28
|
-
|
|
29
|
-
/*
|
|
30
|
-
* Copyright (c) Microsoft Corporation.
|
|
31
|
-
* Licensed under the MIT License.
|
|
32
|
-
*
|
|
33
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
34
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
35
|
-
*/
|
|
36
|
-
const SerialConsoleOperations = {
|
|
37
|
-
type: {
|
|
38
|
-
name: "Composite",
|
|
39
|
-
className: "SerialConsoleOperations",
|
|
40
|
-
modelProperties: {
|
|
41
|
-
value: {
|
|
42
|
-
serializedName: "value",
|
|
43
|
-
type: {
|
|
44
|
-
name: "Sequence",
|
|
45
|
-
element: {
|
|
46
|
-
type: {
|
|
47
|
-
name: "Composite",
|
|
48
|
-
className: "SerialConsoleOperationsValueItem"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
const SerialConsoleOperationsValueItem = {
|
|
57
|
-
type: {
|
|
58
|
-
name: "Composite",
|
|
59
|
-
className: "SerialConsoleOperationsValueItem",
|
|
60
|
-
modelProperties: {
|
|
61
|
-
name: {
|
|
62
|
-
serializedName: "name",
|
|
63
|
-
type: {
|
|
64
|
-
name: "String"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
isDataAction: {
|
|
68
|
-
serializedName: "isDataAction",
|
|
69
|
-
type: {
|
|
70
|
-
name: "String"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
display: {
|
|
74
|
-
serializedName: "display",
|
|
75
|
-
type: {
|
|
76
|
-
name: "Composite",
|
|
77
|
-
className: "SerialConsoleOperationsValueItemDisplay"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const SerialConsoleOperationsValueItemDisplay = {
|
|
84
|
-
type: {
|
|
85
|
-
name: "Composite",
|
|
86
|
-
className: "SerialConsoleOperationsValueItemDisplay",
|
|
87
|
-
modelProperties: {
|
|
88
|
-
provider: {
|
|
89
|
-
serializedName: "provider",
|
|
90
|
-
type: {
|
|
91
|
-
name: "String"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
resource: {
|
|
95
|
-
serializedName: "resource",
|
|
96
|
-
type: {
|
|
97
|
-
name: "String"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
operation: {
|
|
101
|
-
serializedName: "operation",
|
|
102
|
-
type: {
|
|
103
|
-
name: "String"
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
description: {
|
|
107
|
-
serializedName: "description",
|
|
108
|
-
type: {
|
|
109
|
-
name: "String"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
const SerialConsoleStatus = {
|
|
116
|
-
type: {
|
|
117
|
-
name: "Composite",
|
|
118
|
-
className: "SerialConsoleStatus",
|
|
119
|
-
modelProperties: {
|
|
120
|
-
disabled: {
|
|
121
|
-
serializedName: "disabled",
|
|
122
|
-
type: {
|
|
123
|
-
name: "Boolean"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
const GetSerialConsoleSubscriptionNotFound = {
|
|
130
|
-
type: {
|
|
131
|
-
name: "Composite",
|
|
132
|
-
className: "GetSerialConsoleSubscriptionNotFound",
|
|
133
|
-
modelProperties: {
|
|
134
|
-
code: {
|
|
135
|
-
serializedName: "code",
|
|
136
|
-
type: {
|
|
137
|
-
name: "String"
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
message: {
|
|
141
|
-
serializedName: "message",
|
|
142
|
-
type: {
|
|
143
|
-
name: "String"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
const DisableSerialConsoleResult = {
|
|
150
|
-
type: {
|
|
151
|
-
name: "Composite",
|
|
152
|
-
className: "DisableSerialConsoleResult",
|
|
153
|
-
modelProperties: {
|
|
154
|
-
disabled: {
|
|
155
|
-
serializedName: "disabled",
|
|
156
|
-
type: {
|
|
157
|
-
name: "Boolean"
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
const EnableSerialConsoleResult = {
|
|
164
|
-
type: {
|
|
165
|
-
name: "Composite",
|
|
166
|
-
className: "EnableSerialConsoleResult",
|
|
167
|
-
modelProperties: {
|
|
168
|
-
disabled: {
|
|
169
|
-
serializedName: "disabled",
|
|
170
|
-
type: {
|
|
171
|
-
name: "Boolean"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
const SerialPortListResult = {
|
|
178
|
-
type: {
|
|
179
|
-
name: "Composite",
|
|
180
|
-
className: "SerialPortListResult",
|
|
181
|
-
modelProperties: {
|
|
182
|
-
value: {
|
|
183
|
-
serializedName: "value",
|
|
184
|
-
type: {
|
|
185
|
-
name: "Sequence",
|
|
186
|
-
element: {
|
|
187
|
-
type: {
|
|
188
|
-
name: "Composite",
|
|
189
|
-
className: "SerialPort"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
const Resource = {
|
|
198
|
-
type: {
|
|
199
|
-
name: "Composite",
|
|
200
|
-
className: "Resource",
|
|
201
|
-
modelProperties: {
|
|
202
|
-
id: {
|
|
203
|
-
serializedName: "id",
|
|
204
|
-
readOnly: true,
|
|
205
|
-
type: {
|
|
206
|
-
name: "String"
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
name: {
|
|
210
|
-
serializedName: "name",
|
|
211
|
-
readOnly: true,
|
|
212
|
-
type: {
|
|
213
|
-
name: "String"
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
type: {
|
|
217
|
-
serializedName: "type",
|
|
218
|
-
readOnly: true,
|
|
219
|
-
type: {
|
|
220
|
-
name: "String"
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
const CloudError = {
|
|
227
|
-
type: {
|
|
228
|
-
name: "Composite",
|
|
229
|
-
className: "CloudError",
|
|
230
|
-
modelProperties: {
|
|
231
|
-
error: {
|
|
232
|
-
serializedName: "error",
|
|
233
|
-
type: {
|
|
234
|
-
name: "Composite",
|
|
235
|
-
className: "CloudErrorBody"
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
const CloudErrorBody = {
|
|
242
|
-
type: {
|
|
243
|
-
name: "Composite",
|
|
244
|
-
className: "CloudErrorBody",
|
|
245
|
-
modelProperties: {
|
|
246
|
-
code: {
|
|
247
|
-
serializedName: "code",
|
|
248
|
-
type: {
|
|
249
|
-
name: "String"
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
message: {
|
|
253
|
-
serializedName: "message",
|
|
254
|
-
type: {
|
|
255
|
-
name: "String"
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
target: {
|
|
259
|
-
serializedName: "target",
|
|
260
|
-
type: {
|
|
261
|
-
name: "String"
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
details: {
|
|
265
|
-
serializedName: "details",
|
|
266
|
-
type: {
|
|
267
|
-
name: "Sequence",
|
|
268
|
-
element: {
|
|
269
|
-
type: {
|
|
270
|
-
name: "Composite",
|
|
271
|
-
className: "CloudErrorBody"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
const SerialPortConnectResult = {
|
|
280
|
-
type: {
|
|
281
|
-
name: "Composite",
|
|
282
|
-
className: "SerialPortConnectResult",
|
|
283
|
-
modelProperties: {
|
|
284
|
-
connectionString: {
|
|
285
|
-
serializedName: "connectionString",
|
|
286
|
-
type: {
|
|
287
|
-
name: "String"
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
const ProxyResource = {
|
|
294
|
-
type: {
|
|
295
|
-
name: "Composite",
|
|
296
|
-
className: "ProxyResource",
|
|
297
|
-
modelProperties: Object.assign({}, Resource.type.modelProperties)
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
const SerialPort = {
|
|
301
|
-
type: {
|
|
302
|
-
name: "Composite",
|
|
303
|
-
className: "SerialPort",
|
|
304
|
-
modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { state: {
|
|
305
|
-
serializedName: "properties.state",
|
|
306
|
-
type: {
|
|
307
|
-
name: "Enum",
|
|
308
|
-
allowedValues: ["enabled", "disabled"]
|
|
309
|
-
}
|
|
310
|
-
} })
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
var Mappers = /*#__PURE__*/Object.freeze({
|
|
315
|
-
__proto__: null,
|
|
316
|
-
CloudError: CloudError,
|
|
317
|
-
CloudErrorBody: CloudErrorBody,
|
|
318
|
-
DisableSerialConsoleResult: DisableSerialConsoleResult,
|
|
319
|
-
EnableSerialConsoleResult: EnableSerialConsoleResult,
|
|
320
|
-
GetSerialConsoleSubscriptionNotFound: GetSerialConsoleSubscriptionNotFound,
|
|
321
|
-
ProxyResource: ProxyResource,
|
|
322
|
-
Resource: Resource,
|
|
323
|
-
SerialConsoleOperations: SerialConsoleOperations,
|
|
324
|
-
SerialConsoleOperationsValueItem: SerialConsoleOperationsValueItem,
|
|
325
|
-
SerialConsoleOperationsValueItemDisplay: SerialConsoleOperationsValueItemDisplay,
|
|
326
|
-
SerialConsoleStatus: SerialConsoleStatus,
|
|
327
|
-
SerialPort: SerialPort,
|
|
328
|
-
SerialPortConnectResult: SerialPortConnectResult,
|
|
329
|
-
SerialPortListResult: SerialPortListResult
|
|
330
|
-
});
|
|
331
|
-
|
|
332
|
-
/*
|
|
333
|
-
* Copyright (c) Microsoft Corporation.
|
|
334
|
-
* Licensed under the MIT License.
|
|
335
|
-
*
|
|
336
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
337
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
338
|
-
*/
|
|
339
|
-
const accept = {
|
|
340
|
-
parameterPath: "accept",
|
|
341
|
-
mapper: {
|
|
342
|
-
defaultValue: "application/json",
|
|
343
|
-
isConstant: true,
|
|
344
|
-
serializedName: "Accept",
|
|
345
|
-
type: {
|
|
346
|
-
name: "String"
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
const $host = {
|
|
351
|
-
parameterPath: "$host",
|
|
352
|
-
mapper: {
|
|
353
|
-
serializedName: "$host",
|
|
354
|
-
required: true,
|
|
355
|
-
type: {
|
|
356
|
-
name: "String"
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
skipEncoding: true
|
|
360
|
-
};
|
|
361
|
-
const apiVersion = {
|
|
362
|
-
parameterPath: "apiVersion",
|
|
363
|
-
mapper: {
|
|
364
|
-
defaultValue: "2018-05-01",
|
|
365
|
-
isConstant: true,
|
|
366
|
-
serializedName: "api-version",
|
|
367
|
-
type: {
|
|
368
|
-
name: "String"
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
const subscriptionId = {
|
|
373
|
-
parameterPath: "subscriptionId",
|
|
374
|
-
mapper: {
|
|
375
|
-
serializedName: "subscriptionId",
|
|
376
|
-
required: true,
|
|
377
|
-
type: {
|
|
378
|
-
name: "String"
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
const defaultParam = {
|
|
383
|
-
parameterPath: "defaultParam",
|
|
384
|
-
mapper: {
|
|
385
|
-
serializedName: "default",
|
|
386
|
-
required: true,
|
|
387
|
-
type: {
|
|
388
|
-
name: "String"
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
const resourceGroupName = {
|
|
393
|
-
parameterPath: "resourceGroupName",
|
|
394
|
-
mapper: {
|
|
395
|
-
serializedName: "resourceGroupName",
|
|
396
|
-
required: true,
|
|
397
|
-
type: {
|
|
398
|
-
name: "String"
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
const resourceProviderNamespace = {
|
|
403
|
-
parameterPath: "resourceProviderNamespace",
|
|
404
|
-
mapper: {
|
|
405
|
-
serializedName: "resourceProviderNamespace",
|
|
406
|
-
required: true,
|
|
407
|
-
type: {
|
|
408
|
-
name: "String"
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
const parentResourceType = {
|
|
413
|
-
parameterPath: "parentResourceType",
|
|
414
|
-
mapper: {
|
|
415
|
-
serializedName: "parentResourceType",
|
|
416
|
-
required: true,
|
|
417
|
-
type: {
|
|
418
|
-
name: "String"
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
skipEncoding: true
|
|
422
|
-
};
|
|
423
|
-
const parentResource = {
|
|
424
|
-
parameterPath: "parentResource",
|
|
425
|
-
mapper: {
|
|
426
|
-
serializedName: "parentResource",
|
|
427
|
-
required: true,
|
|
428
|
-
type: {
|
|
429
|
-
name: "String"
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
const serialPort = {
|
|
434
|
-
parameterPath: "serialPort",
|
|
435
|
-
mapper: {
|
|
436
|
-
serializedName: "serialPort",
|
|
437
|
-
required: true,
|
|
438
|
-
type: {
|
|
439
|
-
name: "String"
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
const contentType = {
|
|
444
|
-
parameterPath: ["options", "contentType"],
|
|
445
|
-
mapper: {
|
|
446
|
-
defaultValue: "application/json",
|
|
447
|
-
isConstant: true,
|
|
448
|
-
serializedName: "Content-Type",
|
|
449
|
-
type: {
|
|
450
|
-
name: "String"
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
const parameters = {
|
|
455
|
-
parameterPath: "parameters",
|
|
456
|
-
mapper: SerialPort
|
|
457
|
-
};
|
|
458
|
-
|
|
459
|
-
/*
|
|
460
|
-
* Copyright (c) Microsoft Corporation.
|
|
461
|
-
* Licensed under the MIT License.
|
|
462
|
-
*
|
|
463
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
464
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
465
|
-
*/
|
|
466
|
-
/** Class containing SerialPorts operations. */
|
|
467
|
-
class SerialPortsImpl {
|
|
468
|
-
/**
|
|
469
|
-
* Initialize a new instance of the class SerialPorts class.
|
|
470
|
-
* @param client Reference to the service client
|
|
471
|
-
*/
|
|
472
|
-
constructor(client) {
|
|
473
|
-
this.client = client;
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* Lists all of the configured serial ports for a parent resource
|
|
477
|
-
* @param resourceGroupName The name of the resource group.
|
|
478
|
-
* @param resourceProviderNamespace The namespace of the resource provider.
|
|
479
|
-
* @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'
|
|
480
|
-
* or 'virtualMachineScaleSets'
|
|
481
|
-
* @param parentResource The resource name, or subordinate path, for the parent of the serial port. For
|
|
482
|
-
* example: the name of the virtual machine.
|
|
483
|
-
* @param options The options parameters.
|
|
484
|
-
*/
|
|
485
|
-
list(resourceGroupName, resourceProviderNamespace, parentResourceType, parentResource, options) {
|
|
486
|
-
return this.client.sendOperationRequest({
|
|
487
|
-
resourceGroupName,
|
|
488
|
-
resourceProviderNamespace,
|
|
489
|
-
parentResourceType,
|
|
490
|
-
parentResource,
|
|
491
|
-
options
|
|
492
|
-
}, listOperationSpec);
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Gets the configured settings for a serial port
|
|
496
|
-
* @param resourceGroupName The name of the resource group.
|
|
497
|
-
* @param resourceProviderNamespace The namespace of the resource provider.
|
|
498
|
-
* @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'
|
|
499
|
-
* or 'virtualMachineScaleSets'
|
|
500
|
-
* @param parentResource The resource name, or subordinate path, for the parent of the serial port. For
|
|
501
|
-
* example: the name of the virtual machine.
|
|
502
|
-
* @param serialPort The name of the serial port to connect to.
|
|
503
|
-
* @param options The options parameters.
|
|
504
|
-
*/
|
|
505
|
-
get(resourceGroupName, resourceProviderNamespace, parentResourceType, parentResource, serialPort, options) {
|
|
506
|
-
return this.client.sendOperationRequest({
|
|
507
|
-
resourceGroupName,
|
|
508
|
-
resourceProviderNamespace,
|
|
509
|
-
parentResourceType,
|
|
510
|
-
parentResource,
|
|
511
|
-
serialPort,
|
|
512
|
-
options
|
|
513
|
-
}, getOperationSpec);
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Creates or updates a serial port
|
|
517
|
-
* @param resourceGroupName The name of the resource group.
|
|
518
|
-
* @param resourceProviderNamespace The namespace of the resource provider.
|
|
519
|
-
* @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'
|
|
520
|
-
* or 'virtualMachineScaleSets'
|
|
521
|
-
* @param parentResource The resource name, or subordinate path, for the parent of the serial port. For
|
|
522
|
-
* example: the name of the virtual machine.
|
|
523
|
-
* @param serialPort The name of the serial port to create.
|
|
524
|
-
* @param parameters Parameters supplied to create the serial port.
|
|
525
|
-
* @param options The options parameters.
|
|
526
|
-
*/
|
|
527
|
-
create(resourceGroupName, resourceProviderNamespace, parentResourceType, parentResource, serialPort, parameters, options) {
|
|
528
|
-
return this.client.sendOperationRequest({
|
|
529
|
-
resourceGroupName,
|
|
530
|
-
resourceProviderNamespace,
|
|
531
|
-
parentResourceType,
|
|
532
|
-
parentResource,
|
|
533
|
-
serialPort,
|
|
534
|
-
parameters,
|
|
535
|
-
options
|
|
536
|
-
}, createOperationSpec);
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Deletes a serial port
|
|
540
|
-
* @param resourceGroupName The name of the resource group.
|
|
541
|
-
* @param resourceProviderNamespace The namespace of the resource provider.
|
|
542
|
-
* @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'
|
|
543
|
-
* or 'virtualMachineScaleSets'
|
|
544
|
-
* @param parentResource The resource name, or subordinate path, for the parent of the serial port. For
|
|
545
|
-
* example: the name of the virtual machine.
|
|
546
|
-
* @param serialPort The name of the serial port to delete.
|
|
547
|
-
* @param options The options parameters.
|
|
548
|
-
*/
|
|
549
|
-
delete(resourceGroupName, resourceProviderNamespace, parentResourceType, parentResource, serialPort, options) {
|
|
550
|
-
return this.client.sendOperationRequest({
|
|
551
|
-
resourceGroupName,
|
|
552
|
-
resourceProviderNamespace,
|
|
553
|
-
parentResourceType,
|
|
554
|
-
parentResource,
|
|
555
|
-
serialPort,
|
|
556
|
-
options
|
|
557
|
-
}, deleteOperationSpec);
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* Handles requests to list all SerialPort resources in a subscription.
|
|
561
|
-
* @param options The options parameters.
|
|
562
|
-
*/
|
|
563
|
-
listBySubscriptions(options) {
|
|
564
|
-
return this.client.sendOperationRequest({ options }, listBySubscriptionsOperationSpec);
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Connect to serial port of the target resource
|
|
568
|
-
* @param resourceGroupName The name of the resource group.
|
|
569
|
-
* @param resourceProviderNamespace The namespace of the resource provider.
|
|
570
|
-
* @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'
|
|
571
|
-
* or 'virtualMachineScaleSets'
|
|
572
|
-
* @param parentResource The resource name, or subordinate path, for the parent of the serial port. For
|
|
573
|
-
* example: the name of the virtual machine.
|
|
574
|
-
* @param serialPort The name of the serial port to connect to.
|
|
575
|
-
* @param options The options parameters.
|
|
576
|
-
*/
|
|
577
|
-
connect(resourceGroupName, resourceProviderNamespace, parentResourceType, parentResource, serialPort, options) {
|
|
578
|
-
return this.client.sendOperationRequest({
|
|
579
|
-
resourceGroupName,
|
|
580
|
-
resourceProviderNamespace,
|
|
581
|
-
parentResourceType,
|
|
582
|
-
parentResource,
|
|
583
|
-
serialPort,
|
|
584
|
-
options
|
|
585
|
-
}, connectOperationSpec);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
// Operation Specifications
|
|
589
|
-
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
590
|
-
const listOperationSpec = {
|
|
591
|
-
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts",
|
|
592
|
-
httpMethod: "GET",
|
|
593
|
-
responses: {
|
|
594
|
-
200: {
|
|
595
|
-
bodyMapper: SerialPortListResult
|
|
596
|
-
},
|
|
597
|
-
default: {
|
|
598
|
-
bodyMapper: CloudError
|
|
599
|
-
}
|
|
600
|
-
},
|
|
601
|
-
queryParameters: [apiVersion],
|
|
602
|
-
urlParameters: [
|
|
603
|
-
$host,
|
|
604
|
-
subscriptionId,
|
|
605
|
-
resourceGroupName,
|
|
606
|
-
resourceProviderNamespace,
|
|
607
|
-
parentResourceType,
|
|
608
|
-
parentResource
|
|
609
|
-
],
|
|
610
|
-
headerParameters: [accept],
|
|
611
|
-
serializer: serializer$1
|
|
612
|
-
};
|
|
613
|
-
const getOperationSpec = {
|
|
614
|
-
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}",
|
|
615
|
-
httpMethod: "GET",
|
|
616
|
-
responses: {
|
|
617
|
-
200: {
|
|
618
|
-
bodyMapper: SerialPort
|
|
619
|
-
},
|
|
620
|
-
default: {
|
|
621
|
-
bodyMapper: CloudError
|
|
622
|
-
}
|
|
623
|
-
},
|
|
624
|
-
queryParameters: [apiVersion],
|
|
625
|
-
urlParameters: [
|
|
626
|
-
$host,
|
|
627
|
-
subscriptionId,
|
|
628
|
-
resourceGroupName,
|
|
629
|
-
resourceProviderNamespace,
|
|
630
|
-
parentResourceType,
|
|
631
|
-
parentResource,
|
|
632
|
-
serialPort
|
|
633
|
-
],
|
|
634
|
-
headerParameters: [accept],
|
|
635
|
-
serializer: serializer$1
|
|
636
|
-
};
|
|
637
|
-
const createOperationSpec = {
|
|
638
|
-
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}",
|
|
639
|
-
httpMethod: "PUT",
|
|
640
|
-
responses: {
|
|
641
|
-
201: {
|
|
642
|
-
bodyMapper: SerialPort
|
|
643
|
-
},
|
|
644
|
-
default: {
|
|
645
|
-
bodyMapper: CloudError
|
|
646
|
-
}
|
|
647
|
-
},
|
|
648
|
-
requestBody: parameters,
|
|
649
|
-
queryParameters: [apiVersion],
|
|
650
|
-
urlParameters: [
|
|
651
|
-
$host,
|
|
652
|
-
subscriptionId,
|
|
653
|
-
resourceGroupName,
|
|
654
|
-
resourceProviderNamespace,
|
|
655
|
-
parentResourceType,
|
|
656
|
-
parentResource,
|
|
657
|
-
serialPort
|
|
658
|
-
],
|
|
659
|
-
headerParameters: [accept, contentType],
|
|
660
|
-
mediaType: "json",
|
|
661
|
-
serializer: serializer$1
|
|
662
|
-
};
|
|
663
|
-
const deleteOperationSpec = {
|
|
664
|
-
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}",
|
|
665
|
-
httpMethod: "DELETE",
|
|
666
|
-
responses: {
|
|
667
|
-
200: {},
|
|
668
|
-
204: {},
|
|
669
|
-
default: {
|
|
670
|
-
bodyMapper: CloudError
|
|
671
|
-
}
|
|
672
|
-
},
|
|
673
|
-
queryParameters: [apiVersion],
|
|
674
|
-
urlParameters: [
|
|
675
|
-
$host,
|
|
676
|
-
subscriptionId,
|
|
677
|
-
resourceGroupName,
|
|
678
|
-
resourceProviderNamespace,
|
|
679
|
-
parentResourceType,
|
|
680
|
-
parentResource,
|
|
681
|
-
serialPort
|
|
682
|
-
],
|
|
683
|
-
headerParameters: [accept],
|
|
684
|
-
serializer: serializer$1
|
|
685
|
-
};
|
|
686
|
-
const listBySubscriptionsOperationSpec = {
|
|
687
|
-
path: "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/serialPorts",
|
|
688
|
-
httpMethod: "GET",
|
|
689
|
-
responses: {
|
|
690
|
-
200: {
|
|
691
|
-
bodyMapper: SerialPortListResult
|
|
692
|
-
},
|
|
693
|
-
default: {
|
|
694
|
-
bodyMapper: CloudError
|
|
695
|
-
}
|
|
696
|
-
},
|
|
697
|
-
urlParameters: [$host, subscriptionId],
|
|
698
|
-
headerParameters: [accept],
|
|
699
|
-
serializer: serializer$1
|
|
700
|
-
};
|
|
701
|
-
const connectOperationSpec = {
|
|
702
|
-
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}/connect",
|
|
703
|
-
httpMethod: "POST",
|
|
704
|
-
responses: {
|
|
705
|
-
200: {
|
|
706
|
-
bodyMapper: SerialPortConnectResult
|
|
707
|
-
},
|
|
708
|
-
default: {
|
|
709
|
-
bodyMapper: CloudError
|
|
710
|
-
}
|
|
711
|
-
},
|
|
712
|
-
queryParameters: [apiVersion],
|
|
713
|
-
urlParameters: [
|
|
714
|
-
$host,
|
|
715
|
-
subscriptionId,
|
|
716
|
-
resourceGroupName,
|
|
717
|
-
resourceProviderNamespace,
|
|
718
|
-
parentResourceType,
|
|
719
|
-
parentResource,
|
|
720
|
-
serialPort
|
|
721
|
-
],
|
|
722
|
-
headerParameters: [accept],
|
|
723
|
-
serializer: serializer$1
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
/*
|
|
727
|
-
* Copyright (c) Microsoft Corporation.
|
|
728
|
-
* Licensed under the MIT License.
|
|
729
|
-
*
|
|
730
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
731
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
732
|
-
*/
|
|
733
|
-
class MicrosoftSerialConsoleClient extends coreClient__namespace.ServiceClient {
|
|
734
|
-
/**
|
|
735
|
-
* Initializes a new instance of the MicrosoftSerialConsoleClient class.
|
|
736
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
737
|
-
* @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.
|
|
738
|
-
* The subscription ID forms part of the URI for every service call requiring it.
|
|
739
|
-
* @param options The parameter options
|
|
740
|
-
*/
|
|
741
|
-
constructor(credentials, subscriptionId, options) {
|
|
742
|
-
var _a, _b, _c;
|
|
743
|
-
if (credentials === undefined) {
|
|
744
|
-
throw new Error("'credentials' cannot be null");
|
|
745
|
-
}
|
|
746
|
-
if (subscriptionId === undefined) {
|
|
747
|
-
throw new Error("'subscriptionId' cannot be null");
|
|
748
|
-
}
|
|
749
|
-
// Initializing default values for options
|
|
750
|
-
if (!options) {
|
|
751
|
-
options = {};
|
|
752
|
-
}
|
|
753
|
-
const defaults = {
|
|
754
|
-
requestContentType: "application/json; charset=utf-8",
|
|
755
|
-
credential: credentials
|
|
756
|
-
};
|
|
757
|
-
const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;
|
|
758
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
759
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
760
|
-
: `${packageDetails}`;
|
|
761
|
-
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
762
|
-
userAgentPrefix
|
|
763
|
-
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
764
|
-
super(optionsWithDefaults);
|
|
765
|
-
let bearerTokenAuthenticationPolicyFound = false;
|
|
766
|
-
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
767
|
-
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
768
|
-
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
769
|
-
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
770
|
-
}
|
|
771
|
-
if (!options ||
|
|
772
|
-
!options.pipeline ||
|
|
773
|
-
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
774
|
-
!bearerTokenAuthenticationPolicyFound) {
|
|
775
|
-
this.pipeline.removePolicy({
|
|
776
|
-
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
777
|
-
});
|
|
778
|
-
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
779
|
-
credential: credentials,
|
|
780
|
-
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
781
|
-
challengeCallbacks: {
|
|
782
|
-
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
783
|
-
}
|
|
784
|
-
}));
|
|
785
|
-
}
|
|
786
|
-
// Parameter assignments
|
|
787
|
-
this.subscriptionId = subscriptionId;
|
|
788
|
-
// Assigning values to Constant parameters
|
|
789
|
-
this.$host = options.$host || "https://management.azure.com";
|
|
790
|
-
this.apiVersion = options.apiVersion || "2018-05-01";
|
|
791
|
-
this.serialPorts = new SerialPortsImpl(this);
|
|
792
|
-
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
793
|
-
}
|
|
794
|
-
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
795
|
-
addCustomApiVersionPolicy(apiVersion) {
|
|
796
|
-
if (!apiVersion) {
|
|
797
|
-
return;
|
|
798
|
-
}
|
|
799
|
-
const apiVersionPolicy = {
|
|
800
|
-
name: "CustomApiVersionPolicy",
|
|
801
|
-
sendRequest(request, next) {
|
|
802
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
803
|
-
const param = request.url.split("?");
|
|
804
|
-
if (param.length > 1) {
|
|
805
|
-
const newParams = param[1].split("&").map((item) => {
|
|
806
|
-
if (item.indexOf("api-version") > -1) {
|
|
807
|
-
return "api-version=" + apiVersion;
|
|
808
|
-
}
|
|
809
|
-
else {
|
|
810
|
-
return item;
|
|
811
|
-
}
|
|
812
|
-
});
|
|
813
|
-
request.url = param[0] + "?" + newParams.join("&");
|
|
814
|
-
}
|
|
815
|
-
return next(request);
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
};
|
|
819
|
-
this.pipeline.addPolicy(apiVersionPolicy);
|
|
820
|
-
}
|
|
821
|
-
/**
|
|
822
|
-
* Gets a list of Serial Console API operations.
|
|
823
|
-
* @param options The options parameters.
|
|
824
|
-
*/
|
|
825
|
-
listOperations(options) {
|
|
826
|
-
return this.sendOperationRequest({ options }, listOperationsOperationSpec);
|
|
827
|
-
}
|
|
828
|
-
/**
|
|
829
|
-
* Gets whether or not Serial Console is disabled for a given subscription
|
|
830
|
-
* @param defaultParam Default parameter. Leave the value as "default".
|
|
831
|
-
* @param options The options parameters.
|
|
832
|
-
*/
|
|
833
|
-
getConsoleStatus(defaultParam, options) {
|
|
834
|
-
return this.sendOperationRequest({ defaultParam, options }, getConsoleStatusOperationSpec);
|
|
835
|
-
}
|
|
836
|
-
/**
|
|
837
|
-
* Disables the Serial Console service for all VMs and VM scale sets in the provided subscription
|
|
838
|
-
* @param defaultParam Default parameter. Leave the value as "default".
|
|
839
|
-
* @param options The options parameters.
|
|
840
|
-
*/
|
|
841
|
-
disableConsole(defaultParam, options) {
|
|
842
|
-
return this.sendOperationRequest({ defaultParam, options }, disableConsoleOperationSpec);
|
|
843
|
-
}
|
|
844
|
-
/**
|
|
845
|
-
* Enables the Serial Console service for all VMs and VM scale sets in the provided subscription
|
|
846
|
-
* @param defaultParam Default parameter. Leave the value as "default".
|
|
847
|
-
* @param options The options parameters.
|
|
848
|
-
*/
|
|
849
|
-
enableConsole(defaultParam, options) {
|
|
850
|
-
return this.sendOperationRequest({ defaultParam, options }, enableConsoleOperationSpec);
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
// Operation Specifications
|
|
854
|
-
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
855
|
-
const listOperationsOperationSpec = {
|
|
856
|
-
path: "/providers/Microsoft.SerialConsole/operations",
|
|
857
|
-
httpMethod: "GET",
|
|
858
|
-
responses: {
|
|
859
|
-
200: {
|
|
860
|
-
bodyMapper: SerialConsoleOperations
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
queryParameters: [apiVersion],
|
|
864
|
-
urlParameters: [$host],
|
|
865
|
-
headerParameters: [accept],
|
|
866
|
-
serializer
|
|
867
|
-
};
|
|
868
|
-
const getConsoleStatusOperationSpec = {
|
|
869
|
-
path: "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}",
|
|
870
|
-
httpMethod: "GET",
|
|
871
|
-
responses: {
|
|
872
|
-
200: {
|
|
873
|
-
bodyMapper: SerialConsoleStatus
|
|
874
|
-
},
|
|
875
|
-
404: {
|
|
876
|
-
bodyMapper: GetSerialConsoleSubscriptionNotFound
|
|
877
|
-
}
|
|
878
|
-
},
|
|
879
|
-
queryParameters: [apiVersion],
|
|
880
|
-
urlParameters: [
|
|
881
|
-
$host,
|
|
882
|
-
subscriptionId,
|
|
883
|
-
defaultParam
|
|
884
|
-
],
|
|
885
|
-
headerParameters: [accept],
|
|
886
|
-
serializer
|
|
887
|
-
};
|
|
888
|
-
const disableConsoleOperationSpec = {
|
|
889
|
-
path: "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole",
|
|
890
|
-
httpMethod: "POST",
|
|
891
|
-
responses: {
|
|
892
|
-
200: {
|
|
893
|
-
bodyMapper: DisableSerialConsoleResult
|
|
894
|
-
},
|
|
895
|
-
404: {
|
|
896
|
-
bodyMapper: GetSerialConsoleSubscriptionNotFound
|
|
897
|
-
}
|
|
898
|
-
},
|
|
899
|
-
queryParameters: [apiVersion],
|
|
900
|
-
urlParameters: [
|
|
901
|
-
$host,
|
|
902
|
-
subscriptionId,
|
|
903
|
-
defaultParam
|
|
904
|
-
],
|
|
905
|
-
headerParameters: [accept],
|
|
906
|
-
serializer
|
|
907
|
-
};
|
|
908
|
-
const enableConsoleOperationSpec = {
|
|
909
|
-
path: "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole",
|
|
910
|
-
httpMethod: "POST",
|
|
911
|
-
responses: {
|
|
912
|
-
200: {
|
|
913
|
-
bodyMapper: EnableSerialConsoleResult
|
|
914
|
-
},
|
|
915
|
-
404: {
|
|
916
|
-
bodyMapper: GetSerialConsoleSubscriptionNotFound
|
|
917
|
-
}
|
|
918
|
-
},
|
|
919
|
-
queryParameters: [apiVersion],
|
|
920
|
-
urlParameters: [
|
|
921
|
-
$host,
|
|
922
|
-
subscriptionId,
|
|
923
|
-
defaultParam
|
|
924
|
-
],
|
|
925
|
-
headerParameters: [accept],
|
|
926
|
-
serializer
|
|
927
|
-
};
|
|
928
|
-
|
|
929
|
-
exports.MicrosoftSerialConsoleClient = MicrosoftSerialConsoleClient;
|
|
930
|
-
//# sourceMappingURL=index.js.map
|