@aws-sdk/client-ivschat 3.489.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Ivschat.js +1 -45
- package/dist-cjs/IvschatClient.js +1 -43
- package/dist-cjs/commands/CreateChatTokenCommand.js +1 -29
- package/dist-cjs/commands/CreateLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/CreateRoomCommand.js +1 -28
- package/dist-cjs/commands/DeleteLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/DeleteMessageCommand.js +1 -28
- package/dist-cjs/commands/DeleteRoomCommand.js +1 -28
- package/dist-cjs/commands/DisconnectUserCommand.js +1 -29
- package/dist-cjs/commands/GetLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/GetRoomCommand.js +1 -28
- package/dist-cjs/commands/ListLoggingConfigurationsCommand.js +1 -28
- package/dist-cjs/commands/ListRoomsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/SendEventCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/UpdateRoomCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -20
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1985 -11
- package/dist-cjs/models/IvschatServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -181
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListLoggingConfigurationsPaginator.js +1 -7
- package/dist-cjs/pagination/ListRoomsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1250
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1250 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateRoomCommand = exports.de_UpdateLoggingConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SendEventCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRoomsCommand = exports.de_ListLoggingConfigurationsCommand = exports.de_GetRoomCommand = exports.de_GetLoggingConfigurationCommand = exports.de_DisconnectUserCommand = exports.de_DeleteRoomCommand = exports.de_DeleteMessageCommand = exports.de_DeleteLoggingConfigurationCommand = exports.de_CreateRoomCommand = exports.de_CreateLoggingConfigurationCommand = exports.de_CreateChatTokenCommand = exports.se_UpdateRoomCommand = exports.se_UpdateLoggingConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SendEventCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRoomsCommand = exports.se_ListLoggingConfigurationsCommand = exports.se_GetRoomCommand = exports.se_GetLoggingConfigurationCommand = exports.se_DisconnectUserCommand = exports.se_DeleteRoomCommand = exports.se_DeleteMessageCommand = exports.se_DeleteLoggingConfigurationCommand = exports.se_CreateRoomCommand = exports.se_CreateLoggingConfigurationCommand = exports.se_CreateChatTokenCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const core_2 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const IvschatServiceException_1 = require("../models/IvschatServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_CreateChatTokenCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/CreateChatToken");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
attributes: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
-
capabilities: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
-
roomIdentifier: [],
|
|
20
|
-
sessionDurationInMinutes: [],
|
|
21
|
-
userId: [],
|
|
22
|
-
}));
|
|
23
|
-
b.m("POST").h(headers).b(body);
|
|
24
|
-
return b.build();
|
|
25
|
-
};
|
|
26
|
-
exports.se_CreateChatTokenCommand = se_CreateChatTokenCommand;
|
|
27
|
-
const se_CreateLoggingConfigurationCommand = async (input, context) => {
|
|
28
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
29
|
-
const headers = {
|
|
30
|
-
"content-type": "application/json",
|
|
31
|
-
};
|
|
32
|
-
b.bp("/CreateLoggingConfiguration");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
35
|
-
destinationConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
36
|
-
name: [],
|
|
37
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
38
|
-
}));
|
|
39
|
-
b.m("POST").h(headers).b(body);
|
|
40
|
-
return b.build();
|
|
41
|
-
};
|
|
42
|
-
exports.se_CreateLoggingConfigurationCommand = se_CreateLoggingConfigurationCommand;
|
|
43
|
-
const se_CreateRoomCommand = async (input, context) => {
|
|
44
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
45
|
-
const headers = {
|
|
46
|
-
"content-type": "application/json",
|
|
47
|
-
};
|
|
48
|
-
b.bp("/CreateRoom");
|
|
49
|
-
let body;
|
|
50
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
51
|
-
loggingConfigurationIdentifiers: (_) => (0, smithy_client_1._json)(_),
|
|
52
|
-
maximumMessageLength: [],
|
|
53
|
-
maximumMessageRatePerSecond: [],
|
|
54
|
-
messageReviewHandler: (_) => (0, smithy_client_1._json)(_),
|
|
55
|
-
name: [],
|
|
56
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
57
|
-
}));
|
|
58
|
-
b.m("POST").h(headers).b(body);
|
|
59
|
-
return b.build();
|
|
60
|
-
};
|
|
61
|
-
exports.se_CreateRoomCommand = se_CreateRoomCommand;
|
|
62
|
-
const se_DeleteLoggingConfigurationCommand = async (input, context) => {
|
|
63
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
64
|
-
const headers = {
|
|
65
|
-
"content-type": "application/json",
|
|
66
|
-
};
|
|
67
|
-
b.bp("/DeleteLoggingConfiguration");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
70
|
-
identifier: [],
|
|
71
|
-
}));
|
|
72
|
-
b.m("POST").h(headers).b(body);
|
|
73
|
-
return b.build();
|
|
74
|
-
};
|
|
75
|
-
exports.se_DeleteLoggingConfigurationCommand = se_DeleteLoggingConfigurationCommand;
|
|
76
|
-
const se_DeleteMessageCommand = async (input, context) => {
|
|
77
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
78
|
-
const headers = {
|
|
79
|
-
"content-type": "application/json",
|
|
80
|
-
};
|
|
81
|
-
b.bp("/DeleteMessage");
|
|
82
|
-
let body;
|
|
83
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
84
|
-
id: [],
|
|
85
|
-
reason: [],
|
|
86
|
-
roomIdentifier: [],
|
|
87
|
-
}));
|
|
88
|
-
b.m("POST").h(headers).b(body);
|
|
89
|
-
return b.build();
|
|
90
|
-
};
|
|
91
|
-
exports.se_DeleteMessageCommand = se_DeleteMessageCommand;
|
|
92
|
-
const se_DeleteRoomCommand = async (input, context) => {
|
|
93
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
94
|
-
const headers = {
|
|
95
|
-
"content-type": "application/json",
|
|
96
|
-
};
|
|
97
|
-
b.bp("/DeleteRoom");
|
|
98
|
-
let body;
|
|
99
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
100
|
-
identifier: [],
|
|
101
|
-
}));
|
|
102
|
-
b.m("POST").h(headers).b(body);
|
|
103
|
-
return b.build();
|
|
104
|
-
};
|
|
105
|
-
exports.se_DeleteRoomCommand = se_DeleteRoomCommand;
|
|
106
|
-
const se_DisconnectUserCommand = async (input, context) => {
|
|
107
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
108
|
-
const headers = {
|
|
109
|
-
"content-type": "application/json",
|
|
110
|
-
};
|
|
111
|
-
b.bp("/DisconnectUser");
|
|
112
|
-
let body;
|
|
113
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
114
|
-
reason: [],
|
|
115
|
-
roomIdentifier: [],
|
|
116
|
-
userId: [],
|
|
117
|
-
}));
|
|
118
|
-
b.m("POST").h(headers).b(body);
|
|
119
|
-
return b.build();
|
|
120
|
-
};
|
|
121
|
-
exports.se_DisconnectUserCommand = se_DisconnectUserCommand;
|
|
122
|
-
const se_GetLoggingConfigurationCommand = async (input, context) => {
|
|
123
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
124
|
-
const headers = {
|
|
125
|
-
"content-type": "application/json",
|
|
126
|
-
};
|
|
127
|
-
b.bp("/GetLoggingConfiguration");
|
|
128
|
-
let body;
|
|
129
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
130
|
-
identifier: [],
|
|
131
|
-
}));
|
|
132
|
-
b.m("POST").h(headers).b(body);
|
|
133
|
-
return b.build();
|
|
134
|
-
};
|
|
135
|
-
exports.se_GetLoggingConfigurationCommand = se_GetLoggingConfigurationCommand;
|
|
136
|
-
const se_GetRoomCommand = async (input, context) => {
|
|
137
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
138
|
-
const headers = {
|
|
139
|
-
"content-type": "application/json",
|
|
140
|
-
};
|
|
141
|
-
b.bp("/GetRoom");
|
|
142
|
-
let body;
|
|
143
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
144
|
-
identifier: [],
|
|
145
|
-
}));
|
|
146
|
-
b.m("POST").h(headers).b(body);
|
|
147
|
-
return b.build();
|
|
148
|
-
};
|
|
149
|
-
exports.se_GetRoomCommand = se_GetRoomCommand;
|
|
150
|
-
const se_ListLoggingConfigurationsCommand = async (input, context) => {
|
|
151
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
152
|
-
const headers = {
|
|
153
|
-
"content-type": "application/json",
|
|
154
|
-
};
|
|
155
|
-
b.bp("/ListLoggingConfigurations");
|
|
156
|
-
let body;
|
|
157
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
158
|
-
maxResults: [],
|
|
159
|
-
nextToken: [],
|
|
160
|
-
}));
|
|
161
|
-
b.m("POST").h(headers).b(body);
|
|
162
|
-
return b.build();
|
|
163
|
-
};
|
|
164
|
-
exports.se_ListLoggingConfigurationsCommand = se_ListLoggingConfigurationsCommand;
|
|
165
|
-
const se_ListRoomsCommand = async (input, context) => {
|
|
166
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
167
|
-
const headers = {
|
|
168
|
-
"content-type": "application/json",
|
|
169
|
-
};
|
|
170
|
-
b.bp("/ListRooms");
|
|
171
|
-
let body;
|
|
172
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
173
|
-
loggingConfigurationIdentifier: [],
|
|
174
|
-
maxResults: [],
|
|
175
|
-
messageReviewHandlerUri: [],
|
|
176
|
-
name: [],
|
|
177
|
-
nextToken: [],
|
|
178
|
-
}));
|
|
179
|
-
b.m("POST").h(headers).b(body);
|
|
180
|
-
return b.build();
|
|
181
|
-
};
|
|
182
|
-
exports.se_ListRoomsCommand = se_ListRoomsCommand;
|
|
183
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
184
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
185
|
-
const headers = {};
|
|
186
|
-
b.bp("/tags/{resourceArn}");
|
|
187
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
188
|
-
let body;
|
|
189
|
-
b.m("GET").h(headers).b(body);
|
|
190
|
-
return b.build();
|
|
191
|
-
};
|
|
192
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
193
|
-
const se_SendEventCommand = async (input, context) => {
|
|
194
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
195
|
-
const headers = {
|
|
196
|
-
"content-type": "application/json",
|
|
197
|
-
};
|
|
198
|
-
b.bp("/SendEvent");
|
|
199
|
-
let body;
|
|
200
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
201
|
-
attributes: (_) => (0, smithy_client_1._json)(_),
|
|
202
|
-
eventName: [],
|
|
203
|
-
roomIdentifier: [],
|
|
204
|
-
}));
|
|
205
|
-
b.m("POST").h(headers).b(body);
|
|
206
|
-
return b.build();
|
|
207
|
-
};
|
|
208
|
-
exports.se_SendEventCommand = se_SendEventCommand;
|
|
209
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
210
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
211
|
-
const headers = {
|
|
212
|
-
"content-type": "application/json",
|
|
213
|
-
};
|
|
214
|
-
b.bp("/tags/{resourceArn}");
|
|
215
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
216
|
-
let body;
|
|
217
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
218
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
219
|
-
}));
|
|
220
|
-
b.m("POST").h(headers).b(body);
|
|
221
|
-
return b.build();
|
|
222
|
-
};
|
|
223
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
224
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
225
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
226
|
-
const headers = {};
|
|
227
|
-
b.bp("/tags/{resourceArn}");
|
|
228
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
229
|
-
const query = (0, smithy_client_1.map)({
|
|
230
|
-
[_tK]: [
|
|
231
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
232
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
233
|
-
],
|
|
234
|
-
});
|
|
235
|
-
let body;
|
|
236
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
237
|
-
return b.build();
|
|
238
|
-
};
|
|
239
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
240
|
-
const se_UpdateLoggingConfigurationCommand = async (input, context) => {
|
|
241
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
242
|
-
const headers = {
|
|
243
|
-
"content-type": "application/json",
|
|
244
|
-
};
|
|
245
|
-
b.bp("/UpdateLoggingConfiguration");
|
|
246
|
-
let body;
|
|
247
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
248
|
-
destinationConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
249
|
-
identifier: [],
|
|
250
|
-
name: [],
|
|
251
|
-
}));
|
|
252
|
-
b.m("POST").h(headers).b(body);
|
|
253
|
-
return b.build();
|
|
254
|
-
};
|
|
255
|
-
exports.se_UpdateLoggingConfigurationCommand = se_UpdateLoggingConfigurationCommand;
|
|
256
|
-
const se_UpdateRoomCommand = async (input, context) => {
|
|
257
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
258
|
-
const headers = {
|
|
259
|
-
"content-type": "application/json",
|
|
260
|
-
};
|
|
261
|
-
b.bp("/UpdateRoom");
|
|
262
|
-
let body;
|
|
263
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
264
|
-
identifier: [],
|
|
265
|
-
loggingConfigurationIdentifiers: (_) => (0, smithy_client_1._json)(_),
|
|
266
|
-
maximumMessageLength: [],
|
|
267
|
-
maximumMessageRatePerSecond: [],
|
|
268
|
-
messageReviewHandler: (_) => (0, smithy_client_1._json)(_),
|
|
269
|
-
name: [],
|
|
270
|
-
}));
|
|
271
|
-
b.m("POST").h(headers).b(body);
|
|
272
|
-
return b.build();
|
|
273
|
-
};
|
|
274
|
-
exports.se_UpdateRoomCommand = se_UpdateRoomCommand;
|
|
275
|
-
const de_CreateChatTokenCommand = async (output, context) => {
|
|
276
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
277
|
-
return de_CreateChatTokenCommandError(output, context);
|
|
278
|
-
}
|
|
279
|
-
const contents = (0, smithy_client_1.map)({
|
|
280
|
-
$metadata: deserializeMetadata(output),
|
|
281
|
-
});
|
|
282
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
283
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
284
|
-
sessionExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
285
|
-
token: smithy_client_1.expectString,
|
|
286
|
-
tokenExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
287
|
-
});
|
|
288
|
-
Object.assign(contents, doc);
|
|
289
|
-
return contents;
|
|
290
|
-
};
|
|
291
|
-
exports.de_CreateChatTokenCommand = de_CreateChatTokenCommand;
|
|
292
|
-
const de_CreateChatTokenCommandError = async (output, context) => {
|
|
293
|
-
const parsedOutput = {
|
|
294
|
-
...output,
|
|
295
|
-
body: await parseErrorBody(output.body, context),
|
|
296
|
-
};
|
|
297
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
298
|
-
switch (errorCode) {
|
|
299
|
-
case "AccessDeniedException":
|
|
300
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
301
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
302
|
-
case "PendingVerification":
|
|
303
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
304
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
305
|
-
case "ResourceNotFoundException":
|
|
306
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
307
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
308
|
-
case "ValidationException":
|
|
309
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
310
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
311
|
-
default:
|
|
312
|
-
const parsedBody = parsedOutput.body;
|
|
313
|
-
return throwDefaultError({
|
|
314
|
-
output,
|
|
315
|
-
parsedBody,
|
|
316
|
-
errorCode,
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
const de_CreateLoggingConfigurationCommand = async (output, context) => {
|
|
321
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
322
|
-
return de_CreateLoggingConfigurationCommandError(output, context);
|
|
323
|
-
}
|
|
324
|
-
const contents = (0, smithy_client_1.map)({
|
|
325
|
-
$metadata: deserializeMetadata(output),
|
|
326
|
-
});
|
|
327
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
328
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
329
|
-
arn: smithy_client_1.expectString,
|
|
330
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
331
|
-
destinationConfiguration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
332
|
-
id: smithy_client_1.expectString,
|
|
333
|
-
name: smithy_client_1.expectString,
|
|
334
|
-
state: smithy_client_1.expectString,
|
|
335
|
-
tags: smithy_client_1._json,
|
|
336
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
337
|
-
});
|
|
338
|
-
Object.assign(contents, doc);
|
|
339
|
-
return contents;
|
|
340
|
-
};
|
|
341
|
-
exports.de_CreateLoggingConfigurationCommand = de_CreateLoggingConfigurationCommand;
|
|
342
|
-
const de_CreateLoggingConfigurationCommandError = async (output, context) => {
|
|
343
|
-
const parsedOutput = {
|
|
344
|
-
...output,
|
|
345
|
-
body: await parseErrorBody(output.body, context),
|
|
346
|
-
};
|
|
347
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
348
|
-
switch (errorCode) {
|
|
349
|
-
case "AccessDeniedException":
|
|
350
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
351
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
352
|
-
case "ConflictException":
|
|
353
|
-
case "com.amazonaws.ivschat#ConflictException":
|
|
354
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
355
|
-
case "PendingVerification":
|
|
356
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
357
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
358
|
-
case "ResourceNotFoundException":
|
|
359
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
360
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
361
|
-
case "ServiceQuotaExceededException":
|
|
362
|
-
case "com.amazonaws.ivschat#ServiceQuotaExceededException":
|
|
363
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
364
|
-
case "ValidationException":
|
|
365
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
366
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
367
|
-
default:
|
|
368
|
-
const parsedBody = parsedOutput.body;
|
|
369
|
-
return throwDefaultError({
|
|
370
|
-
output,
|
|
371
|
-
parsedBody,
|
|
372
|
-
errorCode,
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
const de_CreateRoomCommand = async (output, context) => {
|
|
377
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
378
|
-
return de_CreateRoomCommandError(output, context);
|
|
379
|
-
}
|
|
380
|
-
const contents = (0, smithy_client_1.map)({
|
|
381
|
-
$metadata: deserializeMetadata(output),
|
|
382
|
-
});
|
|
383
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
384
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
385
|
-
arn: smithy_client_1.expectString,
|
|
386
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
387
|
-
id: smithy_client_1.expectString,
|
|
388
|
-
loggingConfigurationIdentifiers: smithy_client_1._json,
|
|
389
|
-
maximumMessageLength: smithy_client_1.expectInt32,
|
|
390
|
-
maximumMessageRatePerSecond: smithy_client_1.expectInt32,
|
|
391
|
-
messageReviewHandler: smithy_client_1._json,
|
|
392
|
-
name: smithy_client_1.expectString,
|
|
393
|
-
tags: smithy_client_1._json,
|
|
394
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
395
|
-
});
|
|
396
|
-
Object.assign(contents, doc);
|
|
397
|
-
return contents;
|
|
398
|
-
};
|
|
399
|
-
exports.de_CreateRoomCommand = de_CreateRoomCommand;
|
|
400
|
-
const de_CreateRoomCommandError = async (output, context) => {
|
|
401
|
-
const parsedOutput = {
|
|
402
|
-
...output,
|
|
403
|
-
body: await parseErrorBody(output.body, context),
|
|
404
|
-
};
|
|
405
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
406
|
-
switch (errorCode) {
|
|
407
|
-
case "AccessDeniedException":
|
|
408
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
409
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
410
|
-
case "ConflictException":
|
|
411
|
-
case "com.amazonaws.ivschat#ConflictException":
|
|
412
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
413
|
-
case "PendingVerification":
|
|
414
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
415
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
416
|
-
case "ResourceNotFoundException":
|
|
417
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
418
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
419
|
-
case "ServiceQuotaExceededException":
|
|
420
|
-
case "com.amazonaws.ivschat#ServiceQuotaExceededException":
|
|
421
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
422
|
-
case "ValidationException":
|
|
423
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
424
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
425
|
-
default:
|
|
426
|
-
const parsedBody = parsedOutput.body;
|
|
427
|
-
return throwDefaultError({
|
|
428
|
-
output,
|
|
429
|
-
parsedBody,
|
|
430
|
-
errorCode,
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
const de_DeleteLoggingConfigurationCommand = async (output, context) => {
|
|
435
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
436
|
-
return de_DeleteLoggingConfigurationCommandError(output, context);
|
|
437
|
-
}
|
|
438
|
-
const contents = (0, smithy_client_1.map)({
|
|
439
|
-
$metadata: deserializeMetadata(output),
|
|
440
|
-
});
|
|
441
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
442
|
-
return contents;
|
|
443
|
-
};
|
|
444
|
-
exports.de_DeleteLoggingConfigurationCommand = de_DeleteLoggingConfigurationCommand;
|
|
445
|
-
const de_DeleteLoggingConfigurationCommandError = async (output, context) => {
|
|
446
|
-
const parsedOutput = {
|
|
447
|
-
...output,
|
|
448
|
-
body: await parseErrorBody(output.body, context),
|
|
449
|
-
};
|
|
450
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
451
|
-
switch (errorCode) {
|
|
452
|
-
case "AccessDeniedException":
|
|
453
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
454
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
455
|
-
case "ConflictException":
|
|
456
|
-
case "com.amazonaws.ivschat#ConflictException":
|
|
457
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
458
|
-
case "PendingVerification":
|
|
459
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
460
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
461
|
-
case "ResourceNotFoundException":
|
|
462
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
463
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
464
|
-
case "ValidationException":
|
|
465
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
466
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
467
|
-
default:
|
|
468
|
-
const parsedBody = parsedOutput.body;
|
|
469
|
-
return throwDefaultError({
|
|
470
|
-
output,
|
|
471
|
-
parsedBody,
|
|
472
|
-
errorCode,
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
const de_DeleteMessageCommand = async (output, context) => {
|
|
477
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
478
|
-
return de_DeleteMessageCommandError(output, context);
|
|
479
|
-
}
|
|
480
|
-
const contents = (0, smithy_client_1.map)({
|
|
481
|
-
$metadata: deserializeMetadata(output),
|
|
482
|
-
});
|
|
483
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
484
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
485
|
-
id: smithy_client_1.expectString,
|
|
486
|
-
});
|
|
487
|
-
Object.assign(contents, doc);
|
|
488
|
-
return contents;
|
|
489
|
-
};
|
|
490
|
-
exports.de_DeleteMessageCommand = de_DeleteMessageCommand;
|
|
491
|
-
const de_DeleteMessageCommandError = async (output, context) => {
|
|
492
|
-
const parsedOutput = {
|
|
493
|
-
...output,
|
|
494
|
-
body: await parseErrorBody(output.body, context),
|
|
495
|
-
};
|
|
496
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
497
|
-
switch (errorCode) {
|
|
498
|
-
case "AccessDeniedException":
|
|
499
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
500
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
501
|
-
case "PendingVerification":
|
|
502
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
503
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
504
|
-
case "ResourceNotFoundException":
|
|
505
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
506
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
507
|
-
case "ThrottlingException":
|
|
508
|
-
case "com.amazonaws.ivschat#ThrottlingException":
|
|
509
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
510
|
-
case "ValidationException":
|
|
511
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
512
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
513
|
-
default:
|
|
514
|
-
const parsedBody = parsedOutput.body;
|
|
515
|
-
return throwDefaultError({
|
|
516
|
-
output,
|
|
517
|
-
parsedBody,
|
|
518
|
-
errorCode,
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
const de_DeleteRoomCommand = async (output, context) => {
|
|
523
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
524
|
-
return de_DeleteRoomCommandError(output, context);
|
|
525
|
-
}
|
|
526
|
-
const contents = (0, smithy_client_1.map)({
|
|
527
|
-
$metadata: deserializeMetadata(output),
|
|
528
|
-
});
|
|
529
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
530
|
-
return contents;
|
|
531
|
-
};
|
|
532
|
-
exports.de_DeleteRoomCommand = de_DeleteRoomCommand;
|
|
533
|
-
const de_DeleteRoomCommandError = async (output, context) => {
|
|
534
|
-
const parsedOutput = {
|
|
535
|
-
...output,
|
|
536
|
-
body: await parseErrorBody(output.body, context),
|
|
537
|
-
};
|
|
538
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
539
|
-
switch (errorCode) {
|
|
540
|
-
case "AccessDeniedException":
|
|
541
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
542
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
543
|
-
case "PendingVerification":
|
|
544
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
545
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
546
|
-
case "ResourceNotFoundException":
|
|
547
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
548
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
549
|
-
case "ValidationException":
|
|
550
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
551
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
552
|
-
default:
|
|
553
|
-
const parsedBody = parsedOutput.body;
|
|
554
|
-
return throwDefaultError({
|
|
555
|
-
output,
|
|
556
|
-
parsedBody,
|
|
557
|
-
errorCode,
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
const de_DisconnectUserCommand = async (output, context) => {
|
|
562
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
563
|
-
return de_DisconnectUserCommandError(output, context);
|
|
564
|
-
}
|
|
565
|
-
const contents = (0, smithy_client_1.map)({
|
|
566
|
-
$metadata: deserializeMetadata(output),
|
|
567
|
-
});
|
|
568
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
569
|
-
return contents;
|
|
570
|
-
};
|
|
571
|
-
exports.de_DisconnectUserCommand = de_DisconnectUserCommand;
|
|
572
|
-
const de_DisconnectUserCommandError = async (output, context) => {
|
|
573
|
-
const parsedOutput = {
|
|
574
|
-
...output,
|
|
575
|
-
body: await parseErrorBody(output.body, context),
|
|
576
|
-
};
|
|
577
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
578
|
-
switch (errorCode) {
|
|
579
|
-
case "AccessDeniedException":
|
|
580
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
581
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
582
|
-
case "PendingVerification":
|
|
583
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
584
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
585
|
-
case "ResourceNotFoundException":
|
|
586
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
587
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
588
|
-
case "ThrottlingException":
|
|
589
|
-
case "com.amazonaws.ivschat#ThrottlingException":
|
|
590
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
591
|
-
case "ValidationException":
|
|
592
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
593
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
594
|
-
default:
|
|
595
|
-
const parsedBody = parsedOutput.body;
|
|
596
|
-
return throwDefaultError({
|
|
597
|
-
output,
|
|
598
|
-
parsedBody,
|
|
599
|
-
errorCode,
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
const de_GetLoggingConfigurationCommand = async (output, context) => {
|
|
604
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
605
|
-
return de_GetLoggingConfigurationCommandError(output, context);
|
|
606
|
-
}
|
|
607
|
-
const contents = (0, smithy_client_1.map)({
|
|
608
|
-
$metadata: deserializeMetadata(output),
|
|
609
|
-
});
|
|
610
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
611
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
612
|
-
arn: smithy_client_1.expectString,
|
|
613
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
614
|
-
destinationConfiguration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
615
|
-
id: smithy_client_1.expectString,
|
|
616
|
-
name: smithy_client_1.expectString,
|
|
617
|
-
state: smithy_client_1.expectString,
|
|
618
|
-
tags: smithy_client_1._json,
|
|
619
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
620
|
-
});
|
|
621
|
-
Object.assign(contents, doc);
|
|
622
|
-
return contents;
|
|
623
|
-
};
|
|
624
|
-
exports.de_GetLoggingConfigurationCommand = de_GetLoggingConfigurationCommand;
|
|
625
|
-
const de_GetLoggingConfigurationCommandError = async (output, context) => {
|
|
626
|
-
const parsedOutput = {
|
|
627
|
-
...output,
|
|
628
|
-
body: await parseErrorBody(output.body, context),
|
|
629
|
-
};
|
|
630
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
631
|
-
switch (errorCode) {
|
|
632
|
-
case "AccessDeniedException":
|
|
633
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
634
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
635
|
-
case "ResourceNotFoundException":
|
|
636
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
637
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
638
|
-
case "ValidationException":
|
|
639
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
640
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
641
|
-
default:
|
|
642
|
-
const parsedBody = parsedOutput.body;
|
|
643
|
-
return throwDefaultError({
|
|
644
|
-
output,
|
|
645
|
-
parsedBody,
|
|
646
|
-
errorCode,
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
|
-
const de_GetRoomCommand = async (output, context) => {
|
|
651
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
652
|
-
return de_GetRoomCommandError(output, context);
|
|
653
|
-
}
|
|
654
|
-
const contents = (0, smithy_client_1.map)({
|
|
655
|
-
$metadata: deserializeMetadata(output),
|
|
656
|
-
});
|
|
657
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
658
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
659
|
-
arn: smithy_client_1.expectString,
|
|
660
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
661
|
-
id: smithy_client_1.expectString,
|
|
662
|
-
loggingConfigurationIdentifiers: smithy_client_1._json,
|
|
663
|
-
maximumMessageLength: smithy_client_1.expectInt32,
|
|
664
|
-
maximumMessageRatePerSecond: smithy_client_1.expectInt32,
|
|
665
|
-
messageReviewHandler: smithy_client_1._json,
|
|
666
|
-
name: smithy_client_1.expectString,
|
|
667
|
-
tags: smithy_client_1._json,
|
|
668
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
669
|
-
});
|
|
670
|
-
Object.assign(contents, doc);
|
|
671
|
-
return contents;
|
|
672
|
-
};
|
|
673
|
-
exports.de_GetRoomCommand = de_GetRoomCommand;
|
|
674
|
-
const de_GetRoomCommandError = async (output, context) => {
|
|
675
|
-
const parsedOutput = {
|
|
676
|
-
...output,
|
|
677
|
-
body: await parseErrorBody(output.body, context),
|
|
678
|
-
};
|
|
679
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
680
|
-
switch (errorCode) {
|
|
681
|
-
case "AccessDeniedException":
|
|
682
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
683
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
684
|
-
case "ResourceNotFoundException":
|
|
685
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
686
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
687
|
-
case "ValidationException":
|
|
688
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
689
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
690
|
-
default:
|
|
691
|
-
const parsedBody = parsedOutput.body;
|
|
692
|
-
return throwDefaultError({
|
|
693
|
-
output,
|
|
694
|
-
parsedBody,
|
|
695
|
-
errorCode,
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
const de_ListLoggingConfigurationsCommand = async (output, context) => {
|
|
700
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
701
|
-
return de_ListLoggingConfigurationsCommandError(output, context);
|
|
702
|
-
}
|
|
703
|
-
const contents = (0, smithy_client_1.map)({
|
|
704
|
-
$metadata: deserializeMetadata(output),
|
|
705
|
-
});
|
|
706
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
707
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
708
|
-
loggingConfigurations: (_) => de_LoggingConfigurationList(_, context),
|
|
709
|
-
nextToken: smithy_client_1.expectString,
|
|
710
|
-
});
|
|
711
|
-
Object.assign(contents, doc);
|
|
712
|
-
return contents;
|
|
713
|
-
};
|
|
714
|
-
exports.de_ListLoggingConfigurationsCommand = de_ListLoggingConfigurationsCommand;
|
|
715
|
-
const de_ListLoggingConfigurationsCommandError = async (output, context) => {
|
|
716
|
-
const parsedOutput = {
|
|
717
|
-
...output,
|
|
718
|
-
body: await parseErrorBody(output.body, context),
|
|
719
|
-
};
|
|
720
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
721
|
-
switch (errorCode) {
|
|
722
|
-
case "AccessDeniedException":
|
|
723
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
724
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
725
|
-
case "ValidationException":
|
|
726
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
727
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
728
|
-
default:
|
|
729
|
-
const parsedBody = parsedOutput.body;
|
|
730
|
-
return throwDefaultError({
|
|
731
|
-
output,
|
|
732
|
-
parsedBody,
|
|
733
|
-
errorCode,
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
const de_ListRoomsCommand = async (output, context) => {
|
|
738
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
739
|
-
return de_ListRoomsCommandError(output, context);
|
|
740
|
-
}
|
|
741
|
-
const contents = (0, smithy_client_1.map)({
|
|
742
|
-
$metadata: deserializeMetadata(output),
|
|
743
|
-
});
|
|
744
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
745
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
746
|
-
nextToken: smithy_client_1.expectString,
|
|
747
|
-
rooms: (_) => de_RoomList(_, context),
|
|
748
|
-
});
|
|
749
|
-
Object.assign(contents, doc);
|
|
750
|
-
return contents;
|
|
751
|
-
};
|
|
752
|
-
exports.de_ListRoomsCommand = de_ListRoomsCommand;
|
|
753
|
-
const de_ListRoomsCommandError = async (output, context) => {
|
|
754
|
-
const parsedOutput = {
|
|
755
|
-
...output,
|
|
756
|
-
body: await parseErrorBody(output.body, context),
|
|
757
|
-
};
|
|
758
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
759
|
-
switch (errorCode) {
|
|
760
|
-
case "AccessDeniedException":
|
|
761
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
762
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
763
|
-
case "ResourceNotFoundException":
|
|
764
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
765
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
766
|
-
case "ValidationException":
|
|
767
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
768
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
769
|
-
default:
|
|
770
|
-
const parsedBody = parsedOutput.body;
|
|
771
|
-
return throwDefaultError({
|
|
772
|
-
output,
|
|
773
|
-
parsedBody,
|
|
774
|
-
errorCode,
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
};
|
|
778
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
779
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
780
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
781
|
-
}
|
|
782
|
-
const contents = (0, smithy_client_1.map)({
|
|
783
|
-
$metadata: deserializeMetadata(output),
|
|
784
|
-
});
|
|
785
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
786
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
787
|
-
tags: smithy_client_1._json,
|
|
788
|
-
});
|
|
789
|
-
Object.assign(contents, doc);
|
|
790
|
-
return contents;
|
|
791
|
-
};
|
|
792
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
793
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
794
|
-
const parsedOutput = {
|
|
795
|
-
...output,
|
|
796
|
-
body: await parseErrorBody(output.body, context),
|
|
797
|
-
};
|
|
798
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
799
|
-
switch (errorCode) {
|
|
800
|
-
case "InternalServerException":
|
|
801
|
-
case "com.amazonaws.ivschat#InternalServerException":
|
|
802
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
803
|
-
case "ResourceNotFoundException":
|
|
804
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
805
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
806
|
-
case "ValidationException":
|
|
807
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
808
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
809
|
-
default:
|
|
810
|
-
const parsedBody = parsedOutput.body;
|
|
811
|
-
return throwDefaultError({
|
|
812
|
-
output,
|
|
813
|
-
parsedBody,
|
|
814
|
-
errorCode,
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
const de_SendEventCommand = async (output, context) => {
|
|
819
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
820
|
-
return de_SendEventCommandError(output, context);
|
|
821
|
-
}
|
|
822
|
-
const contents = (0, smithy_client_1.map)({
|
|
823
|
-
$metadata: deserializeMetadata(output),
|
|
824
|
-
});
|
|
825
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
826
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
827
|
-
id: smithy_client_1.expectString,
|
|
828
|
-
});
|
|
829
|
-
Object.assign(contents, doc);
|
|
830
|
-
return contents;
|
|
831
|
-
};
|
|
832
|
-
exports.de_SendEventCommand = de_SendEventCommand;
|
|
833
|
-
const de_SendEventCommandError = async (output, context) => {
|
|
834
|
-
const parsedOutput = {
|
|
835
|
-
...output,
|
|
836
|
-
body: await parseErrorBody(output.body, context),
|
|
837
|
-
};
|
|
838
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
839
|
-
switch (errorCode) {
|
|
840
|
-
case "AccessDeniedException":
|
|
841
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
842
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
843
|
-
case "PendingVerification":
|
|
844
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
845
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
846
|
-
case "ResourceNotFoundException":
|
|
847
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
848
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
849
|
-
case "ThrottlingException":
|
|
850
|
-
case "com.amazonaws.ivschat#ThrottlingException":
|
|
851
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
852
|
-
case "ValidationException":
|
|
853
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
854
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
855
|
-
default:
|
|
856
|
-
const parsedBody = parsedOutput.body;
|
|
857
|
-
return throwDefaultError({
|
|
858
|
-
output,
|
|
859
|
-
parsedBody,
|
|
860
|
-
errorCode,
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
};
|
|
864
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
865
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
866
|
-
return de_TagResourceCommandError(output, context);
|
|
867
|
-
}
|
|
868
|
-
const contents = (0, smithy_client_1.map)({
|
|
869
|
-
$metadata: deserializeMetadata(output),
|
|
870
|
-
});
|
|
871
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
872
|
-
return contents;
|
|
873
|
-
};
|
|
874
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
875
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
876
|
-
const parsedOutput = {
|
|
877
|
-
...output,
|
|
878
|
-
body: await parseErrorBody(output.body, context),
|
|
879
|
-
};
|
|
880
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
881
|
-
switch (errorCode) {
|
|
882
|
-
case "InternalServerException":
|
|
883
|
-
case "com.amazonaws.ivschat#InternalServerException":
|
|
884
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
885
|
-
case "ResourceNotFoundException":
|
|
886
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
887
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
888
|
-
case "ValidationException":
|
|
889
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
890
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
891
|
-
default:
|
|
892
|
-
const parsedBody = parsedOutput.body;
|
|
893
|
-
return throwDefaultError({
|
|
894
|
-
output,
|
|
895
|
-
parsedBody,
|
|
896
|
-
errorCode,
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
901
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
902
|
-
return de_UntagResourceCommandError(output, context);
|
|
903
|
-
}
|
|
904
|
-
const contents = (0, smithy_client_1.map)({
|
|
905
|
-
$metadata: deserializeMetadata(output),
|
|
906
|
-
});
|
|
907
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
908
|
-
return contents;
|
|
909
|
-
};
|
|
910
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
911
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
912
|
-
const parsedOutput = {
|
|
913
|
-
...output,
|
|
914
|
-
body: await parseErrorBody(output.body, context),
|
|
915
|
-
};
|
|
916
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
917
|
-
switch (errorCode) {
|
|
918
|
-
case "InternalServerException":
|
|
919
|
-
case "com.amazonaws.ivschat#InternalServerException":
|
|
920
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
921
|
-
case "ResourceNotFoundException":
|
|
922
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
923
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
924
|
-
case "ValidationException":
|
|
925
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
926
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
927
|
-
default:
|
|
928
|
-
const parsedBody = parsedOutput.body;
|
|
929
|
-
return throwDefaultError({
|
|
930
|
-
output,
|
|
931
|
-
parsedBody,
|
|
932
|
-
errorCode,
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
const de_UpdateLoggingConfigurationCommand = async (output, context) => {
|
|
937
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
938
|
-
return de_UpdateLoggingConfigurationCommandError(output, context);
|
|
939
|
-
}
|
|
940
|
-
const contents = (0, smithy_client_1.map)({
|
|
941
|
-
$metadata: deserializeMetadata(output),
|
|
942
|
-
});
|
|
943
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
944
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
945
|
-
arn: smithy_client_1.expectString,
|
|
946
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
947
|
-
destinationConfiguration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
948
|
-
id: smithy_client_1.expectString,
|
|
949
|
-
name: smithy_client_1.expectString,
|
|
950
|
-
state: smithy_client_1.expectString,
|
|
951
|
-
tags: smithy_client_1._json,
|
|
952
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
953
|
-
});
|
|
954
|
-
Object.assign(contents, doc);
|
|
955
|
-
return contents;
|
|
956
|
-
};
|
|
957
|
-
exports.de_UpdateLoggingConfigurationCommand = de_UpdateLoggingConfigurationCommand;
|
|
958
|
-
const de_UpdateLoggingConfigurationCommandError = async (output, context) => {
|
|
959
|
-
const parsedOutput = {
|
|
960
|
-
...output,
|
|
961
|
-
body: await parseErrorBody(output.body, context),
|
|
962
|
-
};
|
|
963
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
964
|
-
switch (errorCode) {
|
|
965
|
-
case "AccessDeniedException":
|
|
966
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
967
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
968
|
-
case "ConflictException":
|
|
969
|
-
case "com.amazonaws.ivschat#ConflictException":
|
|
970
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
971
|
-
case "PendingVerification":
|
|
972
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
973
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
974
|
-
case "ResourceNotFoundException":
|
|
975
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
976
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
977
|
-
case "ValidationException":
|
|
978
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
979
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
980
|
-
default:
|
|
981
|
-
const parsedBody = parsedOutput.body;
|
|
982
|
-
return throwDefaultError({
|
|
983
|
-
output,
|
|
984
|
-
parsedBody,
|
|
985
|
-
errorCode,
|
|
986
|
-
});
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
|
-
const de_UpdateRoomCommand = async (output, context) => {
|
|
990
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
991
|
-
return de_UpdateRoomCommandError(output, context);
|
|
992
|
-
}
|
|
993
|
-
const contents = (0, smithy_client_1.map)({
|
|
994
|
-
$metadata: deserializeMetadata(output),
|
|
995
|
-
});
|
|
996
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
997
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
998
|
-
arn: smithy_client_1.expectString,
|
|
999
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1000
|
-
id: smithy_client_1.expectString,
|
|
1001
|
-
loggingConfigurationIdentifiers: smithy_client_1._json,
|
|
1002
|
-
maximumMessageLength: smithy_client_1.expectInt32,
|
|
1003
|
-
maximumMessageRatePerSecond: smithy_client_1.expectInt32,
|
|
1004
|
-
messageReviewHandler: smithy_client_1._json,
|
|
1005
|
-
name: smithy_client_1.expectString,
|
|
1006
|
-
tags: smithy_client_1._json,
|
|
1007
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1008
|
-
});
|
|
1009
|
-
Object.assign(contents, doc);
|
|
1010
|
-
return contents;
|
|
1011
|
-
};
|
|
1012
|
-
exports.de_UpdateRoomCommand = de_UpdateRoomCommand;
|
|
1013
|
-
const de_UpdateRoomCommandError = async (output, context) => {
|
|
1014
|
-
const parsedOutput = {
|
|
1015
|
-
...output,
|
|
1016
|
-
body: await parseErrorBody(output.body, context),
|
|
1017
|
-
};
|
|
1018
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1019
|
-
switch (errorCode) {
|
|
1020
|
-
case "AccessDeniedException":
|
|
1021
|
-
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
1022
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1023
|
-
case "PendingVerification":
|
|
1024
|
-
case "com.amazonaws.ivschat#PendingVerification":
|
|
1025
|
-
throw await de_PendingVerificationRes(parsedOutput, context);
|
|
1026
|
-
case "ResourceNotFoundException":
|
|
1027
|
-
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
1028
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1029
|
-
case "ValidationException":
|
|
1030
|
-
case "com.amazonaws.ivschat#ValidationException":
|
|
1031
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1032
|
-
default:
|
|
1033
|
-
const parsedBody = parsedOutput.body;
|
|
1034
|
-
return throwDefaultError({
|
|
1035
|
-
output,
|
|
1036
|
-
parsedBody,
|
|
1037
|
-
errorCode,
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
};
|
|
1041
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(IvschatServiceException_1.IvschatServiceException);
|
|
1042
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1043
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1044
|
-
const data = parsedOutput.body;
|
|
1045
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1046
|
-
message: smithy_client_1.expectString,
|
|
1047
|
-
});
|
|
1048
|
-
Object.assign(contents, doc);
|
|
1049
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1050
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1051
|
-
...contents,
|
|
1052
|
-
});
|
|
1053
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1054
|
-
};
|
|
1055
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1056
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1057
|
-
const data = parsedOutput.body;
|
|
1058
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1059
|
-
message: smithy_client_1.expectString,
|
|
1060
|
-
resourceId: smithy_client_1.expectString,
|
|
1061
|
-
resourceType: smithy_client_1.expectString,
|
|
1062
|
-
});
|
|
1063
|
-
Object.assign(contents, doc);
|
|
1064
|
-
const exception = new models_0_1.ConflictException({
|
|
1065
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1066
|
-
...contents,
|
|
1067
|
-
});
|
|
1068
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1069
|
-
};
|
|
1070
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1071
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1072
|
-
const data = parsedOutput.body;
|
|
1073
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1074
|
-
message: smithy_client_1.expectString,
|
|
1075
|
-
});
|
|
1076
|
-
Object.assign(contents, doc);
|
|
1077
|
-
const exception = new models_0_1.InternalServerException({
|
|
1078
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1079
|
-
...contents,
|
|
1080
|
-
});
|
|
1081
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1082
|
-
};
|
|
1083
|
-
const de_PendingVerificationRes = async (parsedOutput, context) => {
|
|
1084
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1085
|
-
const data = parsedOutput.body;
|
|
1086
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1087
|
-
message: smithy_client_1.expectString,
|
|
1088
|
-
});
|
|
1089
|
-
Object.assign(contents, doc);
|
|
1090
|
-
const exception = new models_0_1.PendingVerification({
|
|
1091
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1092
|
-
...contents,
|
|
1093
|
-
});
|
|
1094
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1095
|
-
};
|
|
1096
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1097
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1098
|
-
const data = parsedOutput.body;
|
|
1099
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1100
|
-
message: smithy_client_1.expectString,
|
|
1101
|
-
resourceId: smithy_client_1.expectString,
|
|
1102
|
-
resourceType: smithy_client_1.expectString,
|
|
1103
|
-
});
|
|
1104
|
-
Object.assign(contents, doc);
|
|
1105
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1106
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1107
|
-
...contents,
|
|
1108
|
-
});
|
|
1109
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1110
|
-
};
|
|
1111
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1112
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1113
|
-
const data = parsedOutput.body;
|
|
1114
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1115
|
-
limit: smithy_client_1.expectInt32,
|
|
1116
|
-
message: smithy_client_1.expectString,
|
|
1117
|
-
resourceId: smithy_client_1.expectString,
|
|
1118
|
-
resourceType: smithy_client_1.expectString,
|
|
1119
|
-
});
|
|
1120
|
-
Object.assign(contents, doc);
|
|
1121
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1122
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1123
|
-
...contents,
|
|
1124
|
-
});
|
|
1125
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1126
|
-
};
|
|
1127
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1128
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1129
|
-
const data = parsedOutput.body;
|
|
1130
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1131
|
-
limit: smithy_client_1.expectInt32,
|
|
1132
|
-
message: smithy_client_1.expectString,
|
|
1133
|
-
resourceId: smithy_client_1.expectString,
|
|
1134
|
-
resourceType: smithy_client_1.expectString,
|
|
1135
|
-
});
|
|
1136
|
-
Object.assign(contents, doc);
|
|
1137
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1138
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1139
|
-
...contents,
|
|
1140
|
-
});
|
|
1141
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1142
|
-
};
|
|
1143
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1144
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1145
|
-
const data = parsedOutput.body;
|
|
1146
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1147
|
-
fieldList: smithy_client_1._json,
|
|
1148
|
-
message: smithy_client_1.expectString,
|
|
1149
|
-
reason: smithy_client_1.expectString,
|
|
1150
|
-
});
|
|
1151
|
-
Object.assign(contents, doc);
|
|
1152
|
-
const exception = new models_0_1.ValidationException({
|
|
1153
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1154
|
-
...contents,
|
|
1155
|
-
});
|
|
1156
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1157
|
-
};
|
|
1158
|
-
const de_LoggingConfigurationList = (output, context) => {
|
|
1159
|
-
const retVal = (output || [])
|
|
1160
|
-
.filter((e) => e != null)
|
|
1161
|
-
.map((entry) => {
|
|
1162
|
-
return de_LoggingConfigurationSummary(entry, context);
|
|
1163
|
-
});
|
|
1164
|
-
return retVal;
|
|
1165
|
-
};
|
|
1166
|
-
const de_LoggingConfigurationSummary = (output, context) => {
|
|
1167
|
-
return (0, smithy_client_1.take)(output, {
|
|
1168
|
-
arn: smithy_client_1.expectString,
|
|
1169
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1170
|
-
destinationConfiguration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1171
|
-
id: smithy_client_1.expectString,
|
|
1172
|
-
name: smithy_client_1.expectString,
|
|
1173
|
-
state: smithy_client_1.expectString,
|
|
1174
|
-
tags: smithy_client_1._json,
|
|
1175
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1176
|
-
});
|
|
1177
|
-
};
|
|
1178
|
-
const de_RoomList = (output, context) => {
|
|
1179
|
-
const retVal = (output || [])
|
|
1180
|
-
.filter((e) => e != null)
|
|
1181
|
-
.map((entry) => {
|
|
1182
|
-
return de_RoomSummary(entry, context);
|
|
1183
|
-
});
|
|
1184
|
-
return retVal;
|
|
1185
|
-
};
|
|
1186
|
-
const de_RoomSummary = (output, context) => {
|
|
1187
|
-
return (0, smithy_client_1.take)(output, {
|
|
1188
|
-
arn: smithy_client_1.expectString,
|
|
1189
|
-
createTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1190
|
-
id: smithy_client_1.expectString,
|
|
1191
|
-
loggingConfigurationIdentifiers: smithy_client_1._json,
|
|
1192
|
-
messageReviewHandler: smithy_client_1._json,
|
|
1193
|
-
name: smithy_client_1.expectString,
|
|
1194
|
-
tags: smithy_client_1._json,
|
|
1195
|
-
updateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1196
|
-
});
|
|
1197
|
-
};
|
|
1198
|
-
const deserializeMetadata = (output) => ({
|
|
1199
|
-
httpStatusCode: output.statusCode,
|
|
1200
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1201
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1202
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1203
|
-
});
|
|
1204
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1205
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1206
|
-
value !== null &&
|
|
1207
|
-
value !== "" &&
|
|
1208
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1209
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1210
|
-
const _tK = "tagKeys";
|
|
1211
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1212
|
-
if (encoded.length) {
|
|
1213
|
-
return JSON.parse(encoded);
|
|
1214
|
-
}
|
|
1215
|
-
return {};
|
|
1216
|
-
});
|
|
1217
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1218
|
-
const value = await parseBody(errorBody, context);
|
|
1219
|
-
value.message = value.message ?? value.Message;
|
|
1220
|
-
return value;
|
|
1221
|
-
};
|
|
1222
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1223
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1224
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1225
|
-
let cleanValue = rawValue;
|
|
1226
|
-
if (typeof cleanValue === "number") {
|
|
1227
|
-
cleanValue = cleanValue.toString();
|
|
1228
|
-
}
|
|
1229
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1230
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1231
|
-
}
|
|
1232
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1233
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1234
|
-
}
|
|
1235
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1236
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1237
|
-
}
|
|
1238
|
-
return cleanValue;
|
|
1239
|
-
};
|
|
1240
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1241
|
-
if (headerKey !== undefined) {
|
|
1242
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1243
|
-
}
|
|
1244
|
-
if (data.code !== undefined) {
|
|
1245
|
-
return sanitizeErrorCode(data.code);
|
|
1246
|
-
}
|
|
1247
|
-
if (data["__type"] !== undefined) {
|
|
1248
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1249
|
-
}
|
|
1250
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|