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