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