@aws-sdk/client-workspaces-thin-client 3.489.0 → 3.495.0
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/dist-cjs/WorkSpacesThinClient.js +1 -43
- package/dist-cjs/WorkSpacesThinClientClient.js +1 -43
- package/dist-cjs/commands/CreateEnvironmentCommand.js +1 -29
- package/dist-cjs/commands/DeleteDeviceCommand.js +1 -28
- package/dist-cjs/commands/DeleteEnvironmentCommand.js +1 -28
- package/dist-cjs/commands/DeregisterDeviceCommand.js +1 -28
- package/dist-cjs/commands/GetDeviceCommand.js +1 -29
- package/dist-cjs/commands/GetEnvironmentCommand.js +1 -29
- package/dist-cjs/commands/GetSoftwareSetCommand.js +1 -28
- package/dist-cjs/commands/ListDevicesCommand.js +1 -29
- package/dist-cjs/commands/ListEnvironmentsCommand.js +1 -29
- package/dist-cjs/commands/ListSoftwareSetsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -29
- package/dist-cjs/commands/TagResourceCommand.js +1 -29
- package/dist-cjs/commands/UntagResourceCommand.js +1 -29
- package/dist-cjs/commands/UpdateDeviceCommand.js +1 -29
- package/dist-cjs/commands/UpdateEnvironmentCommand.js +1 -29
- package/dist-cjs/commands/UpdateSoftwareSetCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -19
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2219 -13
- package/dist-cjs/models/WorkSpacesThinClientServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -287
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListDevicesPaginator.js +1 -7
- package/dist-cjs/pagination/ListEnvironmentsPaginator.js +1 -7
- package/dist-cjs/pagination/ListSoftwareSetsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1382
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1382 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateSoftwareSetCommand = exports.de_UpdateEnvironmentCommand = exports.de_UpdateDeviceCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSoftwareSetsCommand = exports.de_ListEnvironmentsCommand = exports.de_ListDevicesCommand = exports.de_GetSoftwareSetCommand = exports.de_GetEnvironmentCommand = exports.de_GetDeviceCommand = exports.de_DeregisterDeviceCommand = exports.de_DeleteEnvironmentCommand = exports.de_DeleteDeviceCommand = exports.de_CreateEnvironmentCommand = exports.se_UpdateSoftwareSetCommand = exports.se_UpdateEnvironmentCommand = exports.se_UpdateDeviceCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSoftwareSetsCommand = exports.se_ListEnvironmentsCommand = exports.se_ListDevicesCommand = exports.se_GetSoftwareSetCommand = exports.se_GetEnvironmentCommand = exports.se_GetDeviceCommand = exports.se_DeregisterDeviceCommand = exports.se_DeleteEnvironmentCommand = exports.se_DeleteDeviceCommand = exports.se_CreateEnvironmentCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const WorkSpacesThinClientServiceException_1 = require("../models/WorkSpacesThinClientServiceException");
|
|
10
|
-
const se_CreateEnvironmentCommand = async (input, context) => {
|
|
11
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
12
|
-
const headers = {
|
|
13
|
-
"content-type": "application/json",
|
|
14
|
-
};
|
|
15
|
-
b.bp("/environments");
|
|
16
|
-
let body;
|
|
17
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
18
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
19
|
-
desiredSoftwareSetId: [],
|
|
20
|
-
desktopArn: [],
|
|
21
|
-
desktopEndpoint: [],
|
|
22
|
-
kmsKeyArn: [],
|
|
23
|
-
maintenanceWindow: (_) => (0, smithy_client_1._json)(_),
|
|
24
|
-
name: [],
|
|
25
|
-
softwareSetUpdateMode: [],
|
|
26
|
-
softwareSetUpdateSchedule: [],
|
|
27
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
28
|
-
}));
|
|
29
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
30
|
-
if (context.disableHostPrefix !== true) {
|
|
31
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
32
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
33
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
b.hn(resolvedHostname);
|
|
37
|
-
b.m("POST").h(headers).b(body);
|
|
38
|
-
return b.build();
|
|
39
|
-
};
|
|
40
|
-
exports.se_CreateEnvironmentCommand = se_CreateEnvironmentCommand;
|
|
41
|
-
const se_DeleteDeviceCommand = async (input, context) => {
|
|
42
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
43
|
-
const headers = {};
|
|
44
|
-
b.bp("/devices/{id}");
|
|
45
|
-
b.p("id", () => input.id, "{id}", false);
|
|
46
|
-
const query = (0, smithy_client_1.map)({
|
|
47
|
-
[_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
|
|
48
|
-
});
|
|
49
|
-
let body;
|
|
50
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
51
|
-
if (context.disableHostPrefix !== true) {
|
|
52
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
53
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
54
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
b.hn(resolvedHostname);
|
|
58
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
59
|
-
return b.build();
|
|
60
|
-
};
|
|
61
|
-
exports.se_DeleteDeviceCommand = se_DeleteDeviceCommand;
|
|
62
|
-
const se_DeleteEnvironmentCommand = async (input, context) => {
|
|
63
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
64
|
-
const headers = {};
|
|
65
|
-
b.bp("/environments/{id}");
|
|
66
|
-
b.p("id", () => input.id, "{id}", false);
|
|
67
|
-
const query = (0, smithy_client_1.map)({
|
|
68
|
-
[_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
|
|
69
|
-
});
|
|
70
|
-
let body;
|
|
71
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
72
|
-
if (context.disableHostPrefix !== true) {
|
|
73
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
74
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
75
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
b.hn(resolvedHostname);
|
|
79
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
80
|
-
return b.build();
|
|
81
|
-
};
|
|
82
|
-
exports.se_DeleteEnvironmentCommand = se_DeleteEnvironmentCommand;
|
|
83
|
-
const se_DeregisterDeviceCommand = async (input, context) => {
|
|
84
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
85
|
-
const headers = {
|
|
86
|
-
"content-type": "application/json",
|
|
87
|
-
};
|
|
88
|
-
b.bp("/deregister-device/{id}");
|
|
89
|
-
b.p("id", () => input.id, "{id}", false);
|
|
90
|
-
let body;
|
|
91
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
92
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
93
|
-
targetDeviceStatus: [],
|
|
94
|
-
}));
|
|
95
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
96
|
-
if (context.disableHostPrefix !== true) {
|
|
97
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
98
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
99
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
b.hn(resolvedHostname);
|
|
103
|
-
b.m("POST").h(headers).b(body);
|
|
104
|
-
return b.build();
|
|
105
|
-
};
|
|
106
|
-
exports.se_DeregisterDeviceCommand = se_DeregisterDeviceCommand;
|
|
107
|
-
const se_GetDeviceCommand = async (input, context) => {
|
|
108
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
109
|
-
const headers = {};
|
|
110
|
-
b.bp("/devices/{id}");
|
|
111
|
-
b.p("id", () => input.id, "{id}", false);
|
|
112
|
-
let body;
|
|
113
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
114
|
-
if (context.disableHostPrefix !== true) {
|
|
115
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
116
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
117
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
b.hn(resolvedHostname);
|
|
121
|
-
b.m("GET").h(headers).b(body);
|
|
122
|
-
return b.build();
|
|
123
|
-
};
|
|
124
|
-
exports.se_GetDeviceCommand = se_GetDeviceCommand;
|
|
125
|
-
const se_GetEnvironmentCommand = async (input, context) => {
|
|
126
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
127
|
-
const headers = {};
|
|
128
|
-
b.bp("/environments/{id}");
|
|
129
|
-
b.p("id", () => input.id, "{id}", false);
|
|
130
|
-
let body;
|
|
131
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
132
|
-
if (context.disableHostPrefix !== true) {
|
|
133
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
134
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
135
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
b.hn(resolvedHostname);
|
|
139
|
-
b.m("GET").h(headers).b(body);
|
|
140
|
-
return b.build();
|
|
141
|
-
};
|
|
142
|
-
exports.se_GetEnvironmentCommand = se_GetEnvironmentCommand;
|
|
143
|
-
const se_GetSoftwareSetCommand = async (input, context) => {
|
|
144
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
145
|
-
const headers = {};
|
|
146
|
-
b.bp("/softwaresets/{id}");
|
|
147
|
-
b.p("id", () => input.id, "{id}", false);
|
|
148
|
-
let body;
|
|
149
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
150
|
-
if (context.disableHostPrefix !== true) {
|
|
151
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
152
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
153
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
b.hn(resolvedHostname);
|
|
157
|
-
b.m("GET").h(headers).b(body);
|
|
158
|
-
return b.build();
|
|
159
|
-
};
|
|
160
|
-
exports.se_GetSoftwareSetCommand = se_GetSoftwareSetCommand;
|
|
161
|
-
const se_ListDevicesCommand = async (input, context) => {
|
|
162
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
163
|
-
const headers = {};
|
|
164
|
-
b.bp("/devices");
|
|
165
|
-
const query = (0, smithy_client_1.map)({
|
|
166
|
-
[_nT]: [, input[_nT]],
|
|
167
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
168
|
-
});
|
|
169
|
-
let body;
|
|
170
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
171
|
-
if (context.disableHostPrefix !== true) {
|
|
172
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
173
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
174
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
b.hn(resolvedHostname);
|
|
178
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
179
|
-
return b.build();
|
|
180
|
-
};
|
|
181
|
-
exports.se_ListDevicesCommand = se_ListDevicesCommand;
|
|
182
|
-
const se_ListEnvironmentsCommand = async (input, context) => {
|
|
183
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
184
|
-
const headers = {};
|
|
185
|
-
b.bp("/environments");
|
|
186
|
-
const query = (0, smithy_client_1.map)({
|
|
187
|
-
[_nT]: [, input[_nT]],
|
|
188
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
189
|
-
});
|
|
190
|
-
let body;
|
|
191
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
192
|
-
if (context.disableHostPrefix !== true) {
|
|
193
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
194
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
195
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
b.hn(resolvedHostname);
|
|
199
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
200
|
-
return b.build();
|
|
201
|
-
};
|
|
202
|
-
exports.se_ListEnvironmentsCommand = se_ListEnvironmentsCommand;
|
|
203
|
-
const se_ListSoftwareSetsCommand = async (input, context) => {
|
|
204
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
205
|
-
const headers = {};
|
|
206
|
-
b.bp("/softwaresets");
|
|
207
|
-
const query = (0, smithy_client_1.map)({
|
|
208
|
-
[_nT]: [, input[_nT]],
|
|
209
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
210
|
-
});
|
|
211
|
-
let body;
|
|
212
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
213
|
-
if (context.disableHostPrefix !== true) {
|
|
214
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
215
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
216
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
b.hn(resolvedHostname);
|
|
220
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
221
|
-
return b.build();
|
|
222
|
-
};
|
|
223
|
-
exports.se_ListSoftwareSetsCommand = se_ListSoftwareSetsCommand;
|
|
224
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
225
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
226
|
-
const headers = {};
|
|
227
|
-
b.bp("/tags/{resourceArn}");
|
|
228
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
229
|
-
let body;
|
|
230
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
231
|
-
if (context.disableHostPrefix !== true) {
|
|
232
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
233
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
234
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
b.hn(resolvedHostname);
|
|
238
|
-
b.m("GET").h(headers).b(body);
|
|
239
|
-
return b.build();
|
|
240
|
-
};
|
|
241
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
242
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
243
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
244
|
-
const headers = {
|
|
245
|
-
"content-type": "application/json",
|
|
246
|
-
};
|
|
247
|
-
b.bp("/tags/{resourceArn}");
|
|
248
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
249
|
-
let body;
|
|
250
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
251
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
252
|
-
}));
|
|
253
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
254
|
-
if (context.disableHostPrefix !== true) {
|
|
255
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
256
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
257
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
b.hn(resolvedHostname);
|
|
261
|
-
b.m("POST").h(headers).b(body);
|
|
262
|
-
return b.build();
|
|
263
|
-
};
|
|
264
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
265
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
266
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
267
|
-
const headers = {};
|
|
268
|
-
b.bp("/tags/{resourceArn}");
|
|
269
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
270
|
-
const query = (0, smithy_client_1.map)({
|
|
271
|
-
[_tK]: [
|
|
272
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
273
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
274
|
-
],
|
|
275
|
-
});
|
|
276
|
-
let body;
|
|
277
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
278
|
-
if (context.disableHostPrefix !== true) {
|
|
279
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
280
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
281
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
b.hn(resolvedHostname);
|
|
285
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
286
|
-
return b.build();
|
|
287
|
-
};
|
|
288
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
289
|
-
const se_UpdateDeviceCommand = async (input, context) => {
|
|
290
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
291
|
-
const headers = {
|
|
292
|
-
"content-type": "application/json",
|
|
293
|
-
};
|
|
294
|
-
b.bp("/devices/{id}");
|
|
295
|
-
b.p("id", () => input.id, "{id}", false);
|
|
296
|
-
let body;
|
|
297
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
298
|
-
desiredSoftwareSetId: [],
|
|
299
|
-
kmsKeyArn: [],
|
|
300
|
-
name: [],
|
|
301
|
-
softwareSetUpdateSchedule: [],
|
|
302
|
-
}));
|
|
303
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
304
|
-
if (context.disableHostPrefix !== true) {
|
|
305
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
306
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
307
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
b.hn(resolvedHostname);
|
|
311
|
-
b.m("PATCH").h(headers).b(body);
|
|
312
|
-
return b.build();
|
|
313
|
-
};
|
|
314
|
-
exports.se_UpdateDeviceCommand = se_UpdateDeviceCommand;
|
|
315
|
-
const se_UpdateEnvironmentCommand = async (input, context) => {
|
|
316
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
317
|
-
const headers = {
|
|
318
|
-
"content-type": "application/json",
|
|
319
|
-
};
|
|
320
|
-
b.bp("/environments/{id}");
|
|
321
|
-
b.p("id", () => input.id, "{id}", false);
|
|
322
|
-
let body;
|
|
323
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
324
|
-
desiredSoftwareSetId: [],
|
|
325
|
-
desktopArn: [],
|
|
326
|
-
desktopEndpoint: [],
|
|
327
|
-
maintenanceWindow: (_) => (0, smithy_client_1._json)(_),
|
|
328
|
-
name: [],
|
|
329
|
-
softwareSetUpdateMode: [],
|
|
330
|
-
softwareSetUpdateSchedule: [],
|
|
331
|
-
}));
|
|
332
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
333
|
-
if (context.disableHostPrefix !== true) {
|
|
334
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
335
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
336
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
b.hn(resolvedHostname);
|
|
340
|
-
b.m("PATCH").h(headers).b(body);
|
|
341
|
-
return b.build();
|
|
342
|
-
};
|
|
343
|
-
exports.se_UpdateEnvironmentCommand = se_UpdateEnvironmentCommand;
|
|
344
|
-
const se_UpdateSoftwareSetCommand = async (input, context) => {
|
|
345
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
346
|
-
const headers = {
|
|
347
|
-
"content-type": "application/json",
|
|
348
|
-
};
|
|
349
|
-
b.bp("/softwaresets/{id}");
|
|
350
|
-
b.p("id", () => input.id, "{id}", false);
|
|
351
|
-
let body;
|
|
352
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
353
|
-
validationStatus: [],
|
|
354
|
-
}));
|
|
355
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
356
|
-
if (context.disableHostPrefix !== true) {
|
|
357
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
358
|
-
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
359
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
b.hn(resolvedHostname);
|
|
363
|
-
b.m("PATCH").h(headers).b(body);
|
|
364
|
-
return b.build();
|
|
365
|
-
};
|
|
366
|
-
exports.se_UpdateSoftwareSetCommand = se_UpdateSoftwareSetCommand;
|
|
367
|
-
const de_CreateEnvironmentCommand = async (output, context) => {
|
|
368
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
369
|
-
return de_CreateEnvironmentCommandError(output, context);
|
|
370
|
-
}
|
|
371
|
-
const contents = (0, smithy_client_1.map)({
|
|
372
|
-
$metadata: deserializeMetadata(output),
|
|
373
|
-
});
|
|
374
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
375
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
376
|
-
environment: (_) => de_EnvironmentSummary(_, context),
|
|
377
|
-
});
|
|
378
|
-
Object.assign(contents, doc);
|
|
379
|
-
return contents;
|
|
380
|
-
};
|
|
381
|
-
exports.de_CreateEnvironmentCommand = de_CreateEnvironmentCommand;
|
|
382
|
-
const de_CreateEnvironmentCommandError = async (output, context) => {
|
|
383
|
-
const parsedOutput = {
|
|
384
|
-
...output,
|
|
385
|
-
body: await parseErrorBody(output.body, context),
|
|
386
|
-
};
|
|
387
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
388
|
-
switch (errorCode) {
|
|
389
|
-
case "AccessDeniedException":
|
|
390
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
391
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
392
|
-
case "ConflictException":
|
|
393
|
-
case "com.amazonaws.workspacesthinclient#ConflictException":
|
|
394
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
395
|
-
case "InternalServerException":
|
|
396
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
397
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
398
|
-
case "ResourceNotFoundException":
|
|
399
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
400
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
401
|
-
case "ServiceQuotaExceededException":
|
|
402
|
-
case "com.amazonaws.workspacesthinclient#ServiceQuotaExceededException":
|
|
403
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
404
|
-
case "ThrottlingException":
|
|
405
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
406
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
407
|
-
case "ValidationException":
|
|
408
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
409
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
410
|
-
default:
|
|
411
|
-
const parsedBody = parsedOutput.body;
|
|
412
|
-
return throwDefaultError({
|
|
413
|
-
output,
|
|
414
|
-
parsedBody,
|
|
415
|
-
errorCode,
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
const de_DeleteDeviceCommand = async (output, context) => {
|
|
420
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
421
|
-
return de_DeleteDeviceCommandError(output, context);
|
|
422
|
-
}
|
|
423
|
-
const contents = (0, smithy_client_1.map)({
|
|
424
|
-
$metadata: deserializeMetadata(output),
|
|
425
|
-
});
|
|
426
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
427
|
-
return contents;
|
|
428
|
-
};
|
|
429
|
-
exports.de_DeleteDeviceCommand = de_DeleteDeviceCommand;
|
|
430
|
-
const de_DeleteDeviceCommandError = async (output, context) => {
|
|
431
|
-
const parsedOutput = {
|
|
432
|
-
...output,
|
|
433
|
-
body: await parseErrorBody(output.body, context),
|
|
434
|
-
};
|
|
435
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
436
|
-
switch (errorCode) {
|
|
437
|
-
case "AccessDeniedException":
|
|
438
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
439
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
440
|
-
case "ConflictException":
|
|
441
|
-
case "com.amazonaws.workspacesthinclient#ConflictException":
|
|
442
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
443
|
-
case "InternalServerException":
|
|
444
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
445
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
446
|
-
case "ResourceNotFoundException":
|
|
447
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
448
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
449
|
-
case "ThrottlingException":
|
|
450
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
451
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
452
|
-
case "ValidationException":
|
|
453
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
454
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
455
|
-
default:
|
|
456
|
-
const parsedBody = parsedOutput.body;
|
|
457
|
-
return throwDefaultError({
|
|
458
|
-
output,
|
|
459
|
-
parsedBody,
|
|
460
|
-
errorCode,
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
const de_DeleteEnvironmentCommand = async (output, context) => {
|
|
465
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
466
|
-
return de_DeleteEnvironmentCommandError(output, context);
|
|
467
|
-
}
|
|
468
|
-
const contents = (0, smithy_client_1.map)({
|
|
469
|
-
$metadata: deserializeMetadata(output),
|
|
470
|
-
});
|
|
471
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
472
|
-
return contents;
|
|
473
|
-
};
|
|
474
|
-
exports.de_DeleteEnvironmentCommand = de_DeleteEnvironmentCommand;
|
|
475
|
-
const de_DeleteEnvironmentCommandError = async (output, context) => {
|
|
476
|
-
const parsedOutput = {
|
|
477
|
-
...output,
|
|
478
|
-
body: await parseErrorBody(output.body, context),
|
|
479
|
-
};
|
|
480
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
481
|
-
switch (errorCode) {
|
|
482
|
-
case "AccessDeniedException":
|
|
483
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
484
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
485
|
-
case "ConflictException":
|
|
486
|
-
case "com.amazonaws.workspacesthinclient#ConflictException":
|
|
487
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
488
|
-
case "InternalServerException":
|
|
489
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
490
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
491
|
-
case "ResourceNotFoundException":
|
|
492
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
493
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
494
|
-
case "ThrottlingException":
|
|
495
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
496
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
497
|
-
case "ValidationException":
|
|
498
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
499
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
500
|
-
default:
|
|
501
|
-
const parsedBody = parsedOutput.body;
|
|
502
|
-
return throwDefaultError({
|
|
503
|
-
output,
|
|
504
|
-
parsedBody,
|
|
505
|
-
errorCode,
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
};
|
|
509
|
-
const de_DeregisterDeviceCommand = async (output, context) => {
|
|
510
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
511
|
-
return de_DeregisterDeviceCommandError(output, context);
|
|
512
|
-
}
|
|
513
|
-
const contents = (0, smithy_client_1.map)({
|
|
514
|
-
$metadata: deserializeMetadata(output),
|
|
515
|
-
});
|
|
516
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
517
|
-
return contents;
|
|
518
|
-
};
|
|
519
|
-
exports.de_DeregisterDeviceCommand = de_DeregisterDeviceCommand;
|
|
520
|
-
const de_DeregisterDeviceCommandError = async (output, context) => {
|
|
521
|
-
const parsedOutput = {
|
|
522
|
-
...output,
|
|
523
|
-
body: await parseErrorBody(output.body, context),
|
|
524
|
-
};
|
|
525
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
526
|
-
switch (errorCode) {
|
|
527
|
-
case "AccessDeniedException":
|
|
528
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
529
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
530
|
-
case "ConflictException":
|
|
531
|
-
case "com.amazonaws.workspacesthinclient#ConflictException":
|
|
532
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
533
|
-
case "InternalServerException":
|
|
534
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
535
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
536
|
-
case "ResourceNotFoundException":
|
|
537
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
538
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
539
|
-
case "ThrottlingException":
|
|
540
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
541
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
542
|
-
case "ValidationException":
|
|
543
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
544
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
545
|
-
default:
|
|
546
|
-
const parsedBody = parsedOutput.body;
|
|
547
|
-
return throwDefaultError({
|
|
548
|
-
output,
|
|
549
|
-
parsedBody,
|
|
550
|
-
errorCode,
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
const de_GetDeviceCommand = async (output, context) => {
|
|
555
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
556
|
-
return de_GetDeviceCommandError(output, context);
|
|
557
|
-
}
|
|
558
|
-
const contents = (0, smithy_client_1.map)({
|
|
559
|
-
$metadata: deserializeMetadata(output),
|
|
560
|
-
});
|
|
561
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
562
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
563
|
-
device: (_) => de_Device(_, context),
|
|
564
|
-
});
|
|
565
|
-
Object.assign(contents, doc);
|
|
566
|
-
return contents;
|
|
567
|
-
};
|
|
568
|
-
exports.de_GetDeviceCommand = de_GetDeviceCommand;
|
|
569
|
-
const de_GetDeviceCommandError = async (output, context) => {
|
|
570
|
-
const parsedOutput = {
|
|
571
|
-
...output,
|
|
572
|
-
body: await parseErrorBody(output.body, context),
|
|
573
|
-
};
|
|
574
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
575
|
-
switch (errorCode) {
|
|
576
|
-
case "AccessDeniedException":
|
|
577
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
578
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
579
|
-
case "InternalServerException":
|
|
580
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
581
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
582
|
-
case "ResourceNotFoundException":
|
|
583
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
584
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
585
|
-
case "ThrottlingException":
|
|
586
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
587
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
588
|
-
case "ValidationException":
|
|
589
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
590
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
591
|
-
default:
|
|
592
|
-
const parsedBody = parsedOutput.body;
|
|
593
|
-
return throwDefaultError({
|
|
594
|
-
output,
|
|
595
|
-
parsedBody,
|
|
596
|
-
errorCode,
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
const de_GetEnvironmentCommand = async (output, context) => {
|
|
601
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
602
|
-
return de_GetEnvironmentCommandError(output, context);
|
|
603
|
-
}
|
|
604
|
-
const contents = (0, smithy_client_1.map)({
|
|
605
|
-
$metadata: deserializeMetadata(output),
|
|
606
|
-
});
|
|
607
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
608
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
609
|
-
environment: (_) => de_Environment(_, context),
|
|
610
|
-
});
|
|
611
|
-
Object.assign(contents, doc);
|
|
612
|
-
return contents;
|
|
613
|
-
};
|
|
614
|
-
exports.de_GetEnvironmentCommand = de_GetEnvironmentCommand;
|
|
615
|
-
const de_GetEnvironmentCommandError = async (output, context) => {
|
|
616
|
-
const parsedOutput = {
|
|
617
|
-
...output,
|
|
618
|
-
body: await parseErrorBody(output.body, context),
|
|
619
|
-
};
|
|
620
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
621
|
-
switch (errorCode) {
|
|
622
|
-
case "AccessDeniedException":
|
|
623
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
624
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
625
|
-
case "InternalServerException":
|
|
626
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
627
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
628
|
-
case "ResourceNotFoundException":
|
|
629
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
630
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
631
|
-
case "ThrottlingException":
|
|
632
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
633
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
634
|
-
case "ValidationException":
|
|
635
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
636
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
637
|
-
default:
|
|
638
|
-
const parsedBody = parsedOutput.body;
|
|
639
|
-
return throwDefaultError({
|
|
640
|
-
output,
|
|
641
|
-
parsedBody,
|
|
642
|
-
errorCode,
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
const de_GetSoftwareSetCommand = async (output, context) => {
|
|
647
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
648
|
-
return de_GetSoftwareSetCommandError(output, context);
|
|
649
|
-
}
|
|
650
|
-
const contents = (0, smithy_client_1.map)({
|
|
651
|
-
$metadata: deserializeMetadata(output),
|
|
652
|
-
});
|
|
653
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
654
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
655
|
-
softwareSet: (_) => de_SoftwareSet(_, context),
|
|
656
|
-
});
|
|
657
|
-
Object.assign(contents, doc);
|
|
658
|
-
return contents;
|
|
659
|
-
};
|
|
660
|
-
exports.de_GetSoftwareSetCommand = de_GetSoftwareSetCommand;
|
|
661
|
-
const de_GetSoftwareSetCommandError = async (output, context) => {
|
|
662
|
-
const parsedOutput = {
|
|
663
|
-
...output,
|
|
664
|
-
body: await parseErrorBody(output.body, context),
|
|
665
|
-
};
|
|
666
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
667
|
-
switch (errorCode) {
|
|
668
|
-
case "AccessDeniedException":
|
|
669
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
670
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
671
|
-
case "InternalServerException":
|
|
672
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
673
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
674
|
-
case "ResourceNotFoundException":
|
|
675
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
676
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
677
|
-
case "ThrottlingException":
|
|
678
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
679
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
680
|
-
case "ValidationException":
|
|
681
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
682
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
683
|
-
default:
|
|
684
|
-
const parsedBody = parsedOutput.body;
|
|
685
|
-
return throwDefaultError({
|
|
686
|
-
output,
|
|
687
|
-
parsedBody,
|
|
688
|
-
errorCode,
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
};
|
|
692
|
-
const de_ListDevicesCommand = async (output, context) => {
|
|
693
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
694
|
-
return de_ListDevicesCommandError(output, context);
|
|
695
|
-
}
|
|
696
|
-
const contents = (0, smithy_client_1.map)({
|
|
697
|
-
$metadata: deserializeMetadata(output),
|
|
698
|
-
});
|
|
699
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
700
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
701
|
-
devices: (_) => de_DeviceList(_, context),
|
|
702
|
-
nextToken: smithy_client_1.expectString,
|
|
703
|
-
});
|
|
704
|
-
Object.assign(contents, doc);
|
|
705
|
-
return contents;
|
|
706
|
-
};
|
|
707
|
-
exports.de_ListDevicesCommand = de_ListDevicesCommand;
|
|
708
|
-
const de_ListDevicesCommandError = async (output, context) => {
|
|
709
|
-
const parsedOutput = {
|
|
710
|
-
...output,
|
|
711
|
-
body: await parseErrorBody(output.body, context),
|
|
712
|
-
};
|
|
713
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
714
|
-
switch (errorCode) {
|
|
715
|
-
case "AccessDeniedException":
|
|
716
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
717
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
718
|
-
case "InternalServerException":
|
|
719
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
720
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
721
|
-
case "ThrottlingException":
|
|
722
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
723
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
724
|
-
case "ValidationException":
|
|
725
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
726
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
727
|
-
default:
|
|
728
|
-
const parsedBody = parsedOutput.body;
|
|
729
|
-
return throwDefaultError({
|
|
730
|
-
output,
|
|
731
|
-
parsedBody,
|
|
732
|
-
errorCode,
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
const de_ListEnvironmentsCommand = async (output, context) => {
|
|
737
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
738
|
-
return de_ListEnvironmentsCommandError(output, context);
|
|
739
|
-
}
|
|
740
|
-
const contents = (0, smithy_client_1.map)({
|
|
741
|
-
$metadata: deserializeMetadata(output),
|
|
742
|
-
});
|
|
743
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
744
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
745
|
-
environments: (_) => de_EnvironmentList(_, context),
|
|
746
|
-
nextToken: smithy_client_1.expectString,
|
|
747
|
-
});
|
|
748
|
-
Object.assign(contents, doc);
|
|
749
|
-
return contents;
|
|
750
|
-
};
|
|
751
|
-
exports.de_ListEnvironmentsCommand = de_ListEnvironmentsCommand;
|
|
752
|
-
const de_ListEnvironmentsCommandError = async (output, context) => {
|
|
753
|
-
const parsedOutput = {
|
|
754
|
-
...output,
|
|
755
|
-
body: await parseErrorBody(output.body, context),
|
|
756
|
-
};
|
|
757
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
758
|
-
switch (errorCode) {
|
|
759
|
-
case "AccessDeniedException":
|
|
760
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
761
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
762
|
-
case "InternalServerException":
|
|
763
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
764
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
765
|
-
case "ThrottlingException":
|
|
766
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
767
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
768
|
-
case "ValidationException":
|
|
769
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
770
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
771
|
-
default:
|
|
772
|
-
const parsedBody = parsedOutput.body;
|
|
773
|
-
return throwDefaultError({
|
|
774
|
-
output,
|
|
775
|
-
parsedBody,
|
|
776
|
-
errorCode,
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
};
|
|
780
|
-
const de_ListSoftwareSetsCommand = async (output, context) => {
|
|
781
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
782
|
-
return de_ListSoftwareSetsCommandError(output, context);
|
|
783
|
-
}
|
|
784
|
-
const contents = (0, smithy_client_1.map)({
|
|
785
|
-
$metadata: deserializeMetadata(output),
|
|
786
|
-
});
|
|
787
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
788
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
789
|
-
nextToken: smithy_client_1.expectString,
|
|
790
|
-
softwareSets: (_) => de_SoftwareSetList(_, context),
|
|
791
|
-
});
|
|
792
|
-
Object.assign(contents, doc);
|
|
793
|
-
return contents;
|
|
794
|
-
};
|
|
795
|
-
exports.de_ListSoftwareSetsCommand = de_ListSoftwareSetsCommand;
|
|
796
|
-
const de_ListSoftwareSetsCommandError = async (output, context) => {
|
|
797
|
-
const parsedOutput = {
|
|
798
|
-
...output,
|
|
799
|
-
body: await parseErrorBody(output.body, context),
|
|
800
|
-
};
|
|
801
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
802
|
-
switch (errorCode) {
|
|
803
|
-
case "AccessDeniedException":
|
|
804
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
805
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
806
|
-
case "InternalServerException":
|
|
807
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
808
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
809
|
-
case "ThrottlingException":
|
|
810
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
811
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
812
|
-
case "ValidationException":
|
|
813
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
814
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
815
|
-
default:
|
|
816
|
-
const parsedBody = parsedOutput.body;
|
|
817
|
-
return throwDefaultError({
|
|
818
|
-
output,
|
|
819
|
-
parsedBody,
|
|
820
|
-
errorCode,
|
|
821
|
-
});
|
|
822
|
-
}
|
|
823
|
-
};
|
|
824
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
825
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
826
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
827
|
-
}
|
|
828
|
-
const contents = (0, smithy_client_1.map)({
|
|
829
|
-
$metadata: deserializeMetadata(output),
|
|
830
|
-
});
|
|
831
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
832
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
833
|
-
tags: smithy_client_1._json,
|
|
834
|
-
});
|
|
835
|
-
Object.assign(contents, doc);
|
|
836
|
-
return contents;
|
|
837
|
-
};
|
|
838
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
839
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
840
|
-
const parsedOutput = {
|
|
841
|
-
...output,
|
|
842
|
-
body: await parseErrorBody(output.body, context),
|
|
843
|
-
};
|
|
844
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
845
|
-
switch (errorCode) {
|
|
846
|
-
case "InternalServiceException":
|
|
847
|
-
case "com.amazonaws.workspacesthinclient#InternalServiceException":
|
|
848
|
-
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
849
|
-
case "ResourceNotFoundException":
|
|
850
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
851
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
852
|
-
case "ValidationException":
|
|
853
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
854
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
855
|
-
default:
|
|
856
|
-
const parsedBody = parsedOutput.body;
|
|
857
|
-
return throwDefaultError({
|
|
858
|
-
output,
|
|
859
|
-
parsedBody,
|
|
860
|
-
errorCode,
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
};
|
|
864
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
865
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
866
|
-
return de_TagResourceCommandError(output, context);
|
|
867
|
-
}
|
|
868
|
-
const contents = (0, smithy_client_1.map)({
|
|
869
|
-
$metadata: deserializeMetadata(output),
|
|
870
|
-
});
|
|
871
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
872
|
-
return contents;
|
|
873
|
-
};
|
|
874
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
875
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
876
|
-
const parsedOutput = {
|
|
877
|
-
...output,
|
|
878
|
-
body: await parseErrorBody(output.body, context),
|
|
879
|
-
};
|
|
880
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
881
|
-
switch (errorCode) {
|
|
882
|
-
case "InternalServiceException":
|
|
883
|
-
case "com.amazonaws.workspacesthinclient#InternalServiceException":
|
|
884
|
-
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
885
|
-
case "ResourceNotFoundException":
|
|
886
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
887
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
888
|
-
case "ValidationException":
|
|
889
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
890
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
891
|
-
default:
|
|
892
|
-
const parsedBody = parsedOutput.body;
|
|
893
|
-
return throwDefaultError({
|
|
894
|
-
output,
|
|
895
|
-
parsedBody,
|
|
896
|
-
errorCode,
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
901
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
902
|
-
return de_UntagResourceCommandError(output, context);
|
|
903
|
-
}
|
|
904
|
-
const contents = (0, smithy_client_1.map)({
|
|
905
|
-
$metadata: deserializeMetadata(output),
|
|
906
|
-
});
|
|
907
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
908
|
-
return contents;
|
|
909
|
-
};
|
|
910
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
911
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
912
|
-
const parsedOutput = {
|
|
913
|
-
...output,
|
|
914
|
-
body: await parseErrorBody(output.body, context),
|
|
915
|
-
};
|
|
916
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
917
|
-
switch (errorCode) {
|
|
918
|
-
case "InternalServiceException":
|
|
919
|
-
case "com.amazonaws.workspacesthinclient#InternalServiceException":
|
|
920
|
-
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
921
|
-
case "ResourceNotFoundException":
|
|
922
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
923
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
924
|
-
case "ValidationException":
|
|
925
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
926
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
927
|
-
default:
|
|
928
|
-
const parsedBody = parsedOutput.body;
|
|
929
|
-
return throwDefaultError({
|
|
930
|
-
output,
|
|
931
|
-
parsedBody,
|
|
932
|
-
errorCode,
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
const de_UpdateDeviceCommand = async (output, context) => {
|
|
937
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
938
|
-
return de_UpdateDeviceCommandError(output, context);
|
|
939
|
-
}
|
|
940
|
-
const contents = (0, smithy_client_1.map)({
|
|
941
|
-
$metadata: deserializeMetadata(output),
|
|
942
|
-
});
|
|
943
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
944
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
945
|
-
device: (_) => de_DeviceSummary(_, context),
|
|
946
|
-
});
|
|
947
|
-
Object.assign(contents, doc);
|
|
948
|
-
return contents;
|
|
949
|
-
};
|
|
950
|
-
exports.de_UpdateDeviceCommand = de_UpdateDeviceCommand;
|
|
951
|
-
const de_UpdateDeviceCommandError = async (output, context) => {
|
|
952
|
-
const parsedOutput = {
|
|
953
|
-
...output,
|
|
954
|
-
body: await parseErrorBody(output.body, context),
|
|
955
|
-
};
|
|
956
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
957
|
-
switch (errorCode) {
|
|
958
|
-
case "AccessDeniedException":
|
|
959
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
960
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
961
|
-
case "InternalServerException":
|
|
962
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
963
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
964
|
-
case "ResourceNotFoundException":
|
|
965
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
966
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
967
|
-
case "ThrottlingException":
|
|
968
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
969
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
970
|
-
case "ValidationException":
|
|
971
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
972
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
973
|
-
default:
|
|
974
|
-
const parsedBody = parsedOutput.body;
|
|
975
|
-
return throwDefaultError({
|
|
976
|
-
output,
|
|
977
|
-
parsedBody,
|
|
978
|
-
errorCode,
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
};
|
|
982
|
-
const de_UpdateEnvironmentCommand = async (output, context) => {
|
|
983
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
984
|
-
return de_UpdateEnvironmentCommandError(output, context);
|
|
985
|
-
}
|
|
986
|
-
const contents = (0, smithy_client_1.map)({
|
|
987
|
-
$metadata: deserializeMetadata(output),
|
|
988
|
-
});
|
|
989
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
990
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
991
|
-
environment: (_) => de_EnvironmentSummary(_, context),
|
|
992
|
-
});
|
|
993
|
-
Object.assign(contents, doc);
|
|
994
|
-
return contents;
|
|
995
|
-
};
|
|
996
|
-
exports.de_UpdateEnvironmentCommand = de_UpdateEnvironmentCommand;
|
|
997
|
-
const de_UpdateEnvironmentCommandError = async (output, context) => {
|
|
998
|
-
const parsedOutput = {
|
|
999
|
-
...output,
|
|
1000
|
-
body: await parseErrorBody(output.body, context),
|
|
1001
|
-
};
|
|
1002
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1003
|
-
switch (errorCode) {
|
|
1004
|
-
case "AccessDeniedException":
|
|
1005
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
1006
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1007
|
-
case "InternalServerException":
|
|
1008
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
1009
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1010
|
-
case "ResourceNotFoundException":
|
|
1011
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
1012
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1013
|
-
case "ThrottlingException":
|
|
1014
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
1015
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1016
|
-
case "ValidationException":
|
|
1017
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
1018
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1019
|
-
default:
|
|
1020
|
-
const parsedBody = parsedOutput.body;
|
|
1021
|
-
return throwDefaultError({
|
|
1022
|
-
output,
|
|
1023
|
-
parsedBody,
|
|
1024
|
-
errorCode,
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
|
-
const de_UpdateSoftwareSetCommand = async (output, context) => {
|
|
1029
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1030
|
-
return de_UpdateSoftwareSetCommandError(output, context);
|
|
1031
|
-
}
|
|
1032
|
-
const contents = (0, smithy_client_1.map)({
|
|
1033
|
-
$metadata: deserializeMetadata(output),
|
|
1034
|
-
});
|
|
1035
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1036
|
-
return contents;
|
|
1037
|
-
};
|
|
1038
|
-
exports.de_UpdateSoftwareSetCommand = de_UpdateSoftwareSetCommand;
|
|
1039
|
-
const de_UpdateSoftwareSetCommandError = async (output, context) => {
|
|
1040
|
-
const parsedOutput = {
|
|
1041
|
-
...output,
|
|
1042
|
-
body: await parseErrorBody(output.body, context),
|
|
1043
|
-
};
|
|
1044
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1045
|
-
switch (errorCode) {
|
|
1046
|
-
case "AccessDeniedException":
|
|
1047
|
-
case "com.amazonaws.workspacesthinclient#AccessDeniedException":
|
|
1048
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1049
|
-
case "InternalServerException":
|
|
1050
|
-
case "com.amazonaws.workspacesthinclient#InternalServerException":
|
|
1051
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1052
|
-
case "ResourceNotFoundException":
|
|
1053
|
-
case "com.amazonaws.workspacesthinclient#ResourceNotFoundException":
|
|
1054
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1055
|
-
case "ThrottlingException":
|
|
1056
|
-
case "com.amazonaws.workspacesthinclient#ThrottlingException":
|
|
1057
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1058
|
-
case "ValidationException":
|
|
1059
|
-
case "com.amazonaws.workspacesthinclient#ValidationException":
|
|
1060
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1061
|
-
default:
|
|
1062
|
-
const parsedBody = parsedOutput.body;
|
|
1063
|
-
return throwDefaultError({
|
|
1064
|
-
output,
|
|
1065
|
-
parsedBody,
|
|
1066
|
-
errorCode,
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(WorkSpacesThinClientServiceException_1.WorkSpacesThinClientServiceException);
|
|
1071
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1072
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1073
|
-
const data = parsedOutput.body;
|
|
1074
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1075
|
-
message: smithy_client_1.expectString,
|
|
1076
|
-
});
|
|
1077
|
-
Object.assign(contents, doc);
|
|
1078
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1079
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1080
|
-
...contents,
|
|
1081
|
-
});
|
|
1082
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1083
|
-
};
|
|
1084
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1085
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1086
|
-
const data = parsedOutput.body;
|
|
1087
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1088
|
-
message: smithy_client_1.expectString,
|
|
1089
|
-
resourceId: smithy_client_1.expectString,
|
|
1090
|
-
resourceType: smithy_client_1.expectString,
|
|
1091
|
-
});
|
|
1092
|
-
Object.assign(contents, doc);
|
|
1093
|
-
const exception = new models_0_1.ConflictException({
|
|
1094
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1095
|
-
...contents,
|
|
1096
|
-
});
|
|
1097
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1098
|
-
};
|
|
1099
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1100
|
-
const contents = (0, smithy_client_1.map)({
|
|
1101
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1102
|
-
});
|
|
1103
|
-
const data = parsedOutput.body;
|
|
1104
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1105
|
-
message: smithy_client_1.expectString,
|
|
1106
|
-
});
|
|
1107
|
-
Object.assign(contents, doc);
|
|
1108
|
-
const exception = new models_0_1.InternalServerException({
|
|
1109
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1110
|
-
...contents,
|
|
1111
|
-
});
|
|
1112
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1113
|
-
};
|
|
1114
|
-
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
1115
|
-
const contents = (0, smithy_client_1.map)({
|
|
1116
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1117
|
-
});
|
|
1118
|
-
const data = parsedOutput.body;
|
|
1119
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1120
|
-
message: smithy_client_1.expectString,
|
|
1121
|
-
});
|
|
1122
|
-
Object.assign(contents, doc);
|
|
1123
|
-
const exception = new models_0_1.InternalServiceException({
|
|
1124
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1125
|
-
...contents,
|
|
1126
|
-
});
|
|
1127
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1128
|
-
};
|
|
1129
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1130
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1131
|
-
const data = parsedOutput.body;
|
|
1132
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1133
|
-
message: smithy_client_1.expectString,
|
|
1134
|
-
resourceId: smithy_client_1.expectString,
|
|
1135
|
-
resourceType: smithy_client_1.expectString,
|
|
1136
|
-
});
|
|
1137
|
-
Object.assign(contents, doc);
|
|
1138
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1139
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1140
|
-
...contents,
|
|
1141
|
-
});
|
|
1142
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1143
|
-
};
|
|
1144
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1145
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1146
|
-
const data = parsedOutput.body;
|
|
1147
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1148
|
-
message: smithy_client_1.expectString,
|
|
1149
|
-
quotaCode: smithy_client_1.expectString,
|
|
1150
|
-
resourceId: smithy_client_1.expectString,
|
|
1151
|
-
resourceType: smithy_client_1.expectString,
|
|
1152
|
-
serviceCode: smithy_client_1.expectString,
|
|
1153
|
-
});
|
|
1154
|
-
Object.assign(contents, doc);
|
|
1155
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1156
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1157
|
-
...contents,
|
|
1158
|
-
});
|
|
1159
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1160
|
-
};
|
|
1161
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1162
|
-
const contents = (0, smithy_client_1.map)({
|
|
1163
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1164
|
-
});
|
|
1165
|
-
const data = parsedOutput.body;
|
|
1166
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1167
|
-
message: smithy_client_1.expectString,
|
|
1168
|
-
quotaCode: smithy_client_1.expectString,
|
|
1169
|
-
serviceCode: smithy_client_1.expectString,
|
|
1170
|
-
});
|
|
1171
|
-
Object.assign(contents, doc);
|
|
1172
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1173
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1174
|
-
...contents,
|
|
1175
|
-
});
|
|
1176
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1177
|
-
};
|
|
1178
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1179
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1180
|
-
const data = parsedOutput.body;
|
|
1181
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1182
|
-
fieldList: smithy_client_1._json,
|
|
1183
|
-
message: smithy_client_1.expectString,
|
|
1184
|
-
reason: smithy_client_1.expectString,
|
|
1185
|
-
});
|
|
1186
|
-
Object.assign(contents, doc);
|
|
1187
|
-
const exception = new models_0_1.ValidationException({
|
|
1188
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1189
|
-
...contents,
|
|
1190
|
-
});
|
|
1191
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1192
|
-
};
|
|
1193
|
-
const de_Device = (output, context) => {
|
|
1194
|
-
return (0, smithy_client_1.take)(output, {
|
|
1195
|
-
arn: smithy_client_1.expectString,
|
|
1196
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1197
|
-
currentSoftwareSetId: smithy_client_1.expectString,
|
|
1198
|
-
currentSoftwareSetVersion: smithy_client_1.expectString,
|
|
1199
|
-
desiredSoftwareSetId: smithy_client_1.expectString,
|
|
1200
|
-
environmentId: smithy_client_1.expectString,
|
|
1201
|
-
id: smithy_client_1.expectString,
|
|
1202
|
-
kmsKeyArn: smithy_client_1.expectString,
|
|
1203
|
-
lastConnectedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1204
|
-
lastPostureAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1205
|
-
model: smithy_client_1.expectString,
|
|
1206
|
-
name: smithy_client_1.expectString,
|
|
1207
|
-
pendingSoftwareSetId: smithy_client_1.expectString,
|
|
1208
|
-
pendingSoftwareSetVersion: smithy_client_1.expectString,
|
|
1209
|
-
serialNumber: smithy_client_1.expectString,
|
|
1210
|
-
softwareSetComplianceStatus: smithy_client_1.expectString,
|
|
1211
|
-
softwareSetUpdateSchedule: smithy_client_1.expectString,
|
|
1212
|
-
softwareSetUpdateStatus: smithy_client_1.expectString,
|
|
1213
|
-
status: smithy_client_1.expectString,
|
|
1214
|
-
tags: smithy_client_1._json,
|
|
1215
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1216
|
-
});
|
|
1217
|
-
};
|
|
1218
|
-
const de_DeviceList = (output, context) => {
|
|
1219
|
-
const retVal = (output || [])
|
|
1220
|
-
.filter((e) => e != null)
|
|
1221
|
-
.map((entry) => {
|
|
1222
|
-
return de_DeviceSummary(entry, context);
|
|
1223
|
-
});
|
|
1224
|
-
return retVal;
|
|
1225
|
-
};
|
|
1226
|
-
const de_DeviceSummary = (output, context) => {
|
|
1227
|
-
return (0, smithy_client_1.take)(output, {
|
|
1228
|
-
arn: smithy_client_1.expectString,
|
|
1229
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1230
|
-
currentSoftwareSetId: smithy_client_1.expectString,
|
|
1231
|
-
desiredSoftwareSetId: smithy_client_1.expectString,
|
|
1232
|
-
environmentId: smithy_client_1.expectString,
|
|
1233
|
-
id: smithy_client_1.expectString,
|
|
1234
|
-
lastConnectedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1235
|
-
lastPostureAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1236
|
-
model: smithy_client_1.expectString,
|
|
1237
|
-
name: smithy_client_1.expectString,
|
|
1238
|
-
pendingSoftwareSetId: smithy_client_1.expectString,
|
|
1239
|
-
serialNumber: smithy_client_1.expectString,
|
|
1240
|
-
softwareSetUpdateSchedule: smithy_client_1.expectString,
|
|
1241
|
-
status: smithy_client_1.expectString,
|
|
1242
|
-
tags: smithy_client_1._json,
|
|
1243
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1244
|
-
});
|
|
1245
|
-
};
|
|
1246
|
-
const de_Environment = (output, context) => {
|
|
1247
|
-
return (0, smithy_client_1.take)(output, {
|
|
1248
|
-
activationCode: smithy_client_1.expectString,
|
|
1249
|
-
arn: smithy_client_1.expectString,
|
|
1250
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1251
|
-
desiredSoftwareSetId: smithy_client_1.expectString,
|
|
1252
|
-
desktopArn: smithy_client_1.expectString,
|
|
1253
|
-
desktopEndpoint: smithy_client_1.expectString,
|
|
1254
|
-
desktopType: smithy_client_1.expectString,
|
|
1255
|
-
id: smithy_client_1.expectString,
|
|
1256
|
-
kmsKeyArn: smithy_client_1.expectString,
|
|
1257
|
-
maintenanceWindow: smithy_client_1._json,
|
|
1258
|
-
name: smithy_client_1.expectString,
|
|
1259
|
-
pendingSoftwareSetId: smithy_client_1.expectString,
|
|
1260
|
-
pendingSoftwareSetVersion: smithy_client_1.expectString,
|
|
1261
|
-
registeredDevicesCount: smithy_client_1.expectInt32,
|
|
1262
|
-
softwareSetComplianceStatus: smithy_client_1.expectString,
|
|
1263
|
-
softwareSetUpdateMode: smithy_client_1.expectString,
|
|
1264
|
-
softwareSetUpdateSchedule: smithy_client_1.expectString,
|
|
1265
|
-
tags: smithy_client_1._json,
|
|
1266
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1267
|
-
});
|
|
1268
|
-
};
|
|
1269
|
-
const de_EnvironmentList = (output, context) => {
|
|
1270
|
-
const retVal = (output || [])
|
|
1271
|
-
.filter((e) => e != null)
|
|
1272
|
-
.map((entry) => {
|
|
1273
|
-
return de_EnvironmentSummary(entry, context);
|
|
1274
|
-
});
|
|
1275
|
-
return retVal;
|
|
1276
|
-
};
|
|
1277
|
-
const de_EnvironmentSummary = (output, context) => {
|
|
1278
|
-
return (0, smithy_client_1.take)(output, {
|
|
1279
|
-
activationCode: smithy_client_1.expectString,
|
|
1280
|
-
arn: smithy_client_1.expectString,
|
|
1281
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1282
|
-
desiredSoftwareSetId: smithy_client_1.expectString,
|
|
1283
|
-
desktopArn: smithy_client_1.expectString,
|
|
1284
|
-
desktopEndpoint: smithy_client_1.expectString,
|
|
1285
|
-
desktopType: smithy_client_1.expectString,
|
|
1286
|
-
id: smithy_client_1.expectString,
|
|
1287
|
-
maintenanceWindow: smithy_client_1._json,
|
|
1288
|
-
name: smithy_client_1.expectString,
|
|
1289
|
-
pendingSoftwareSetId: smithy_client_1.expectString,
|
|
1290
|
-
softwareSetUpdateMode: smithy_client_1.expectString,
|
|
1291
|
-
softwareSetUpdateSchedule: smithy_client_1.expectString,
|
|
1292
|
-
tags: smithy_client_1._json,
|
|
1293
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1294
|
-
});
|
|
1295
|
-
};
|
|
1296
|
-
const de_SoftwareSet = (output, context) => {
|
|
1297
|
-
return (0, smithy_client_1.take)(output, {
|
|
1298
|
-
arn: smithy_client_1.expectString,
|
|
1299
|
-
id: smithy_client_1.expectString,
|
|
1300
|
-
releasedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1301
|
-
software: smithy_client_1._json,
|
|
1302
|
-
supportedUntil: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1303
|
-
validationStatus: smithy_client_1.expectString,
|
|
1304
|
-
version: smithy_client_1.expectString,
|
|
1305
|
-
});
|
|
1306
|
-
};
|
|
1307
|
-
const de_SoftwareSetList = (output, context) => {
|
|
1308
|
-
const retVal = (output || [])
|
|
1309
|
-
.filter((e) => e != null)
|
|
1310
|
-
.map((entry) => {
|
|
1311
|
-
return de_SoftwareSetSummary(entry, context);
|
|
1312
|
-
});
|
|
1313
|
-
return retVal;
|
|
1314
|
-
};
|
|
1315
|
-
const de_SoftwareSetSummary = (output, context) => {
|
|
1316
|
-
return (0, smithy_client_1.take)(output, {
|
|
1317
|
-
arn: smithy_client_1.expectString,
|
|
1318
|
-
id: smithy_client_1.expectString,
|
|
1319
|
-
releasedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1320
|
-
supportedUntil: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1321
|
-
validationStatus: smithy_client_1.expectString,
|
|
1322
|
-
version: smithy_client_1.expectString,
|
|
1323
|
-
});
|
|
1324
|
-
};
|
|
1325
|
-
const deserializeMetadata = (output) => ({
|
|
1326
|
-
httpStatusCode: output.statusCode,
|
|
1327
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1328
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1329
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1330
|
-
});
|
|
1331
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1332
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1333
|
-
value !== null &&
|
|
1334
|
-
value !== "" &&
|
|
1335
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1336
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1337
|
-
const _cT = "clientToken";
|
|
1338
|
-
const _mR = "maxResults";
|
|
1339
|
-
const _nT = "nextToken";
|
|
1340
|
-
const _rAS = "retryAfterSeconds";
|
|
1341
|
-
const _ra = "retry-after";
|
|
1342
|
-
const _tK = "tagKeys";
|
|
1343
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1344
|
-
if (encoded.length) {
|
|
1345
|
-
return JSON.parse(encoded);
|
|
1346
|
-
}
|
|
1347
|
-
return {};
|
|
1348
|
-
});
|
|
1349
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1350
|
-
const value = await parseBody(errorBody, context);
|
|
1351
|
-
value.message = value.message ?? value.Message;
|
|
1352
|
-
return value;
|
|
1353
|
-
};
|
|
1354
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1355
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1356
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1357
|
-
let cleanValue = rawValue;
|
|
1358
|
-
if (typeof cleanValue === "number") {
|
|
1359
|
-
cleanValue = cleanValue.toString();
|
|
1360
|
-
}
|
|
1361
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1362
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1363
|
-
}
|
|
1364
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1365
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1366
|
-
}
|
|
1367
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1368
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1369
|
-
}
|
|
1370
|
-
return cleanValue;
|
|
1371
|
-
};
|
|
1372
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1373
|
-
if (headerKey !== undefined) {
|
|
1374
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1375
|
-
}
|
|
1376
|
-
if (data.code !== undefined) {
|
|
1377
|
-
return sanitizeErrorCode(data.code);
|
|
1378
|
-
}
|
|
1379
|
-
if (data["__type"] !== undefined) {
|
|
1380
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1381
|
-
}
|
|
1382
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|