@aws-sdk/client-ivschat 3.211.0 → 3.213.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/README.md +37 -5
- package/dist-cjs/Ivschat.js +75 -0
- package/dist-cjs/commands/CreateLoggingConfigurationCommand.js +46 -0
- package/dist-cjs/commands/DeleteLoggingConfigurationCommand.js +46 -0
- package/dist-cjs/commands/GetLoggingConfigurationCommand.js +46 -0
- package/dist-cjs/commands/ListLoggingConfigurationsCommand.js +46 -0
- package/dist-cjs/commands/UpdateLoggingConfigurationCommand.js +46 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +121 -6
- package/dist-cjs/pagination/ListLoggingConfigurationsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +522 -16
- package/dist-es/Ivschat.js +75 -0
- package/dist-es/commands/CreateLoggingConfigurationCommand.js +42 -0
- package/dist-es/commands/DeleteLoggingConfigurationCommand.js +42 -0
- package/dist-es/commands/GetLoggingConfigurationCommand.js +42 -0
- package/dist-es/commands/ListLoggingConfigurationsCommand.js +42 -0
- package/dist-es/commands/UpdateLoggingConfigurationCommand.js +42 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +105 -5
- package/dist-es/pagination/ListLoggingConfigurationsPaginator.js +32 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +513 -17
- package/dist-types/Ivschat.d.ts +84 -8
- package/dist-types/IvschatClient.d.ts +44 -7
- package/dist-types/commands/CreateChatTokenCommand.d.ts +10 -3
- package/dist-types/commands/CreateLoggingConfigurationCommand.d.ts +38 -0
- package/dist-types/commands/DeleteLoggingConfigurationCommand.d.ts +37 -0
- package/dist-types/commands/GetLoggingConfigurationCommand.d.ts +37 -0
- package/dist-types/commands/ListLoggingConfigurationsCommand.d.ts +38 -0
- package/dist-types/commands/UpdateLoggingConfigurationCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +473 -37
- package/dist-types/pagination/ListLoggingConfigurationsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
- package/dist-types/ts3.4/Ivschat.d.ts +85 -0
- package/dist-types/ts3.4/IvschatClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/CreateLoggingConfigurationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/DeleteLoggingConfigurationCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/GetLoggingConfigurationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListLoggingConfigurationsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/UpdateLoggingConfigurationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +184 -9
- package/dist-types/ts3.4/pagination/ListLoggingConfigurationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +28 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
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";
|
|
2
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { IvschatServiceException as __BaseException } from "../models/IvschatServiceException";
|
|
4
|
-
import { AccessDeniedException, ConflictException, InternalServerException, PendingVerification, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
4
|
+
import { AccessDeniedException, ConflictException, DestinationConfiguration, InternalServerException, PendingVerification, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
5
|
export const serializeAws_restJson1CreateChatTokenCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
7
|
const headers = {
|
|
@@ -30,6 +30,30 @@ export const serializeAws_restJson1CreateChatTokenCommand = async (input, contex
|
|
|
30
30
|
body,
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
+
export const serializeAws_restJson1CreateLoggingConfigurationCommand = async (input, context) => {
|
|
34
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
35
|
+
const headers = {
|
|
36
|
+
"content-type": "application/json",
|
|
37
|
+
};
|
|
38
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLoggingConfiguration";
|
|
39
|
+
let body;
|
|
40
|
+
body = JSON.stringify({
|
|
41
|
+
...(input.destinationConfiguration != null && {
|
|
42
|
+
destinationConfiguration: serializeAws_restJson1DestinationConfiguration(input.destinationConfiguration, context),
|
|
43
|
+
}),
|
|
44
|
+
...(input.name != null && { name: input.name }),
|
|
45
|
+
...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
46
|
+
});
|
|
47
|
+
return new __HttpRequest({
|
|
48
|
+
protocol,
|
|
49
|
+
hostname,
|
|
50
|
+
port,
|
|
51
|
+
method: "POST",
|
|
52
|
+
headers,
|
|
53
|
+
path: resolvedPath,
|
|
54
|
+
body,
|
|
55
|
+
});
|
|
56
|
+
};
|
|
33
57
|
export const serializeAws_restJson1CreateRoomCommand = async (input, context) => {
|
|
34
58
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
35
59
|
const headers = {
|
|
@@ -38,6 +62,9 @@ export const serializeAws_restJson1CreateRoomCommand = async (input, context) =>
|
|
|
38
62
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateRoom";
|
|
39
63
|
let body;
|
|
40
64
|
body = JSON.stringify({
|
|
65
|
+
...(input.loggingConfigurationIdentifiers != null && {
|
|
66
|
+
loggingConfigurationIdentifiers: serializeAws_restJson1LoggingConfigurationIdentifierList(input.loggingConfigurationIdentifiers, context),
|
|
67
|
+
}),
|
|
41
68
|
...(input.maximumMessageLength != null && { maximumMessageLength: input.maximumMessageLength }),
|
|
42
69
|
...(input.maximumMessageRatePerSecond != null && {
|
|
43
70
|
maximumMessageRatePerSecond: input.maximumMessageRatePerSecond,
|
|
@@ -58,6 +85,26 @@ export const serializeAws_restJson1CreateRoomCommand = async (input, context) =>
|
|
|
58
85
|
body,
|
|
59
86
|
});
|
|
60
87
|
};
|
|
88
|
+
export const serializeAws_restJson1DeleteLoggingConfigurationCommand = async (input, context) => {
|
|
89
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
90
|
+
const headers = {
|
|
91
|
+
"content-type": "application/json",
|
|
92
|
+
};
|
|
93
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLoggingConfiguration";
|
|
94
|
+
let body;
|
|
95
|
+
body = JSON.stringify({
|
|
96
|
+
...(input.identifier != null && { identifier: input.identifier }),
|
|
97
|
+
});
|
|
98
|
+
return new __HttpRequest({
|
|
99
|
+
protocol,
|
|
100
|
+
hostname,
|
|
101
|
+
port,
|
|
102
|
+
method: "POST",
|
|
103
|
+
headers,
|
|
104
|
+
path: resolvedPath,
|
|
105
|
+
body,
|
|
106
|
+
});
|
|
107
|
+
};
|
|
61
108
|
export const serializeAws_restJson1DeleteMessageCommand = async (input, context) => {
|
|
62
109
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
63
110
|
const headers = {
|
|
@@ -122,6 +169,26 @@ export const serializeAws_restJson1DisconnectUserCommand = async (input, context
|
|
|
122
169
|
body,
|
|
123
170
|
});
|
|
124
171
|
};
|
|
172
|
+
export const serializeAws_restJson1GetLoggingConfigurationCommand = async (input, context) => {
|
|
173
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
174
|
+
const headers = {
|
|
175
|
+
"content-type": "application/json",
|
|
176
|
+
};
|
|
177
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLoggingConfiguration";
|
|
178
|
+
let body;
|
|
179
|
+
body = JSON.stringify({
|
|
180
|
+
...(input.identifier != null && { identifier: input.identifier }),
|
|
181
|
+
});
|
|
182
|
+
return new __HttpRequest({
|
|
183
|
+
protocol,
|
|
184
|
+
hostname,
|
|
185
|
+
port,
|
|
186
|
+
method: "POST",
|
|
187
|
+
headers,
|
|
188
|
+
path: resolvedPath,
|
|
189
|
+
body,
|
|
190
|
+
});
|
|
191
|
+
};
|
|
125
192
|
export const serializeAws_restJson1GetRoomCommand = async (input, context) => {
|
|
126
193
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
127
194
|
const headers = {
|
|
@@ -142,6 +209,27 @@ export const serializeAws_restJson1GetRoomCommand = async (input, context) => {
|
|
|
142
209
|
body,
|
|
143
210
|
});
|
|
144
211
|
};
|
|
212
|
+
export const serializeAws_restJson1ListLoggingConfigurationsCommand = async (input, context) => {
|
|
213
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
214
|
+
const headers = {
|
|
215
|
+
"content-type": "application/json",
|
|
216
|
+
};
|
|
217
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListLoggingConfigurations";
|
|
218
|
+
let body;
|
|
219
|
+
body = JSON.stringify({
|
|
220
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
221
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
222
|
+
});
|
|
223
|
+
return new __HttpRequest({
|
|
224
|
+
protocol,
|
|
225
|
+
hostname,
|
|
226
|
+
port,
|
|
227
|
+
method: "POST",
|
|
228
|
+
headers,
|
|
229
|
+
path: resolvedPath,
|
|
230
|
+
body,
|
|
231
|
+
});
|
|
232
|
+
};
|
|
145
233
|
export const serializeAws_restJson1ListRoomsCommand = async (input, context) => {
|
|
146
234
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
147
235
|
const headers = {
|
|
@@ -150,6 +238,9 @@ export const serializeAws_restJson1ListRoomsCommand = async (input, context) =>
|
|
|
150
238
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListRooms";
|
|
151
239
|
let body;
|
|
152
240
|
body = JSON.stringify({
|
|
241
|
+
...(input.loggingConfigurationIdentifier != null && {
|
|
242
|
+
loggingConfigurationIdentifier: input.loggingConfigurationIdentifier,
|
|
243
|
+
}),
|
|
153
244
|
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
154
245
|
...(input.messageReviewHandlerUri != null && { messageReviewHandlerUri: input.messageReviewHandlerUri }),
|
|
155
246
|
...(input.name != null && { name: input.name }),
|
|
@@ -244,6 +335,30 @@ export const serializeAws_restJson1UntagResourceCommand = async (input, context)
|
|
|
244
335
|
body,
|
|
245
336
|
});
|
|
246
337
|
};
|
|
338
|
+
export const serializeAws_restJson1UpdateLoggingConfigurationCommand = async (input, context) => {
|
|
339
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
340
|
+
const headers = {
|
|
341
|
+
"content-type": "application/json",
|
|
342
|
+
};
|
|
343
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLoggingConfiguration";
|
|
344
|
+
let body;
|
|
345
|
+
body = JSON.stringify({
|
|
346
|
+
...(input.destinationConfiguration != null && {
|
|
347
|
+
destinationConfiguration: serializeAws_restJson1DestinationConfiguration(input.destinationConfiguration, context),
|
|
348
|
+
}),
|
|
349
|
+
...(input.identifier != null && { identifier: input.identifier }),
|
|
350
|
+
...(input.name != null && { name: input.name }),
|
|
351
|
+
});
|
|
352
|
+
return new __HttpRequest({
|
|
353
|
+
protocol,
|
|
354
|
+
hostname,
|
|
355
|
+
port,
|
|
356
|
+
method: "POST",
|
|
357
|
+
headers,
|
|
358
|
+
path: resolvedPath,
|
|
359
|
+
body,
|
|
360
|
+
});
|
|
361
|
+
};
|
|
247
362
|
export const serializeAws_restJson1UpdateRoomCommand = async (input, context) => {
|
|
248
363
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
249
364
|
const headers = {
|
|
@@ -253,6 +368,9 @@ export const serializeAws_restJson1UpdateRoomCommand = async (input, context) =>
|
|
|
253
368
|
let body;
|
|
254
369
|
body = JSON.stringify({
|
|
255
370
|
...(input.identifier != null && { identifier: input.identifier }),
|
|
371
|
+
...(input.loggingConfigurationIdentifiers != null && {
|
|
372
|
+
loggingConfigurationIdentifiers: serializeAws_restJson1LoggingConfigurationIdentifierList(input.loggingConfigurationIdentifiers, context),
|
|
373
|
+
}),
|
|
256
374
|
...(input.maximumMessageLength != null && { maximumMessageLength: input.maximumMessageLength }),
|
|
257
375
|
...(input.maximumMessageRatePerSecond != null && {
|
|
258
376
|
maximumMessageRatePerSecond: input.maximumMessageRatePerSecond,
|
|
@@ -320,6 +438,75 @@ const deserializeAws_restJson1CreateChatTokenCommandError = async (output, conte
|
|
|
320
438
|
});
|
|
321
439
|
}
|
|
322
440
|
};
|
|
441
|
+
export const deserializeAws_restJson1CreateLoggingConfigurationCommand = async (output, context) => {
|
|
442
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
443
|
+
return deserializeAws_restJson1CreateLoggingConfigurationCommandError(output, context);
|
|
444
|
+
}
|
|
445
|
+
const contents = map({
|
|
446
|
+
$metadata: deserializeMetadata(output),
|
|
447
|
+
});
|
|
448
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
449
|
+
if (data.arn != null) {
|
|
450
|
+
contents.arn = __expectString(data.arn);
|
|
451
|
+
}
|
|
452
|
+
if (data.createTime != null) {
|
|
453
|
+
contents.createTime = __expectNonNull(__parseRfc3339DateTime(data.createTime));
|
|
454
|
+
}
|
|
455
|
+
if (data.destinationConfiguration != null) {
|
|
456
|
+
contents.destinationConfiguration = deserializeAws_restJson1DestinationConfiguration(__expectUnion(data.destinationConfiguration), context);
|
|
457
|
+
}
|
|
458
|
+
if (data.id != null) {
|
|
459
|
+
contents.id = __expectString(data.id);
|
|
460
|
+
}
|
|
461
|
+
if (data.name != null) {
|
|
462
|
+
contents.name = __expectString(data.name);
|
|
463
|
+
}
|
|
464
|
+
if (data.state != null) {
|
|
465
|
+
contents.state = __expectString(data.state);
|
|
466
|
+
}
|
|
467
|
+
if (data.tags != null) {
|
|
468
|
+
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
469
|
+
}
|
|
470
|
+
if (data.updateTime != null) {
|
|
471
|
+
contents.updateTime = __expectNonNull(__parseRfc3339DateTime(data.updateTime));
|
|
472
|
+
}
|
|
473
|
+
return contents;
|
|
474
|
+
};
|
|
475
|
+
const deserializeAws_restJson1CreateLoggingConfigurationCommandError = async (output, context) => {
|
|
476
|
+
const parsedOutput = {
|
|
477
|
+
...output,
|
|
478
|
+
body: await parseErrorBody(output.body, context),
|
|
479
|
+
};
|
|
480
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
481
|
+
switch (errorCode) {
|
|
482
|
+
case "AccessDeniedException":
|
|
483
|
+
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
484
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
485
|
+
case "ConflictException":
|
|
486
|
+
case "com.amazonaws.ivschat#ConflictException":
|
|
487
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
488
|
+
case "PendingVerification":
|
|
489
|
+
case "com.amazonaws.ivschat#PendingVerification":
|
|
490
|
+
throw await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context);
|
|
491
|
+
case "ResourceNotFoundException":
|
|
492
|
+
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
493
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
494
|
+
case "ServiceQuotaExceededException":
|
|
495
|
+
case "com.amazonaws.ivschat#ServiceQuotaExceededException":
|
|
496
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
497
|
+
case "ValidationException":
|
|
498
|
+
case "com.amazonaws.ivschat#ValidationException":
|
|
499
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
500
|
+
default:
|
|
501
|
+
const parsedBody = parsedOutput.body;
|
|
502
|
+
throwDefaultError({
|
|
503
|
+
output,
|
|
504
|
+
parsedBody,
|
|
505
|
+
exceptionCtor: __BaseException,
|
|
506
|
+
errorCode,
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
};
|
|
323
510
|
export const deserializeAws_restJson1CreateRoomCommand = async (output, context) => {
|
|
324
511
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
325
512
|
return deserializeAws_restJson1CreateRoomCommandError(output, context);
|
|
@@ -337,6 +524,9 @@ export const deserializeAws_restJson1CreateRoomCommand = async (output, context)
|
|
|
337
524
|
if (data.id != null) {
|
|
338
525
|
contents.id = __expectString(data.id);
|
|
339
526
|
}
|
|
527
|
+
if (data.loggingConfigurationIdentifiers != null) {
|
|
528
|
+
contents.loggingConfigurationIdentifiers = deserializeAws_restJson1LoggingConfigurationIdentifierList(data.loggingConfigurationIdentifiers, context);
|
|
529
|
+
}
|
|
340
530
|
if (data.maximumMessageLength != null) {
|
|
341
531
|
contents.maximumMessageLength = __expectInt32(data.maximumMessageLength);
|
|
342
532
|
}
|
|
@@ -392,6 +582,48 @@ const deserializeAws_restJson1CreateRoomCommandError = async (output, context) =
|
|
|
392
582
|
});
|
|
393
583
|
}
|
|
394
584
|
};
|
|
585
|
+
export const deserializeAws_restJson1DeleteLoggingConfigurationCommand = async (output, context) => {
|
|
586
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
587
|
+
return deserializeAws_restJson1DeleteLoggingConfigurationCommandError(output, context);
|
|
588
|
+
}
|
|
589
|
+
const contents = map({
|
|
590
|
+
$metadata: deserializeMetadata(output),
|
|
591
|
+
});
|
|
592
|
+
await collectBody(output.body, context);
|
|
593
|
+
return contents;
|
|
594
|
+
};
|
|
595
|
+
const deserializeAws_restJson1DeleteLoggingConfigurationCommandError = async (output, context) => {
|
|
596
|
+
const parsedOutput = {
|
|
597
|
+
...output,
|
|
598
|
+
body: await parseErrorBody(output.body, context),
|
|
599
|
+
};
|
|
600
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
601
|
+
switch (errorCode) {
|
|
602
|
+
case "AccessDeniedException":
|
|
603
|
+
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
604
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
605
|
+
case "ConflictException":
|
|
606
|
+
case "com.amazonaws.ivschat#ConflictException":
|
|
607
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
608
|
+
case "PendingVerification":
|
|
609
|
+
case "com.amazonaws.ivschat#PendingVerification":
|
|
610
|
+
throw await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context);
|
|
611
|
+
case "ResourceNotFoundException":
|
|
612
|
+
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
613
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
614
|
+
case "ValidationException":
|
|
615
|
+
case "com.amazonaws.ivschat#ValidationException":
|
|
616
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
617
|
+
default:
|
|
618
|
+
const parsedBody = parsedOutput.body;
|
|
619
|
+
throwDefaultError({
|
|
620
|
+
output,
|
|
621
|
+
parsedBody,
|
|
622
|
+
exceptionCtor: __BaseException,
|
|
623
|
+
errorCode,
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
};
|
|
395
627
|
export const deserializeAws_restJson1DeleteMessageCommand = async (output, context) => {
|
|
396
628
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
397
629
|
return deserializeAws_restJson1DeleteMessageCommandError(output, context);
|
|
@@ -512,6 +744,66 @@ const deserializeAws_restJson1DisconnectUserCommandError = async (output, contex
|
|
|
512
744
|
});
|
|
513
745
|
}
|
|
514
746
|
};
|
|
747
|
+
export const deserializeAws_restJson1GetLoggingConfigurationCommand = async (output, context) => {
|
|
748
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
749
|
+
return deserializeAws_restJson1GetLoggingConfigurationCommandError(output, context);
|
|
750
|
+
}
|
|
751
|
+
const contents = map({
|
|
752
|
+
$metadata: deserializeMetadata(output),
|
|
753
|
+
});
|
|
754
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
755
|
+
if (data.arn != null) {
|
|
756
|
+
contents.arn = __expectString(data.arn);
|
|
757
|
+
}
|
|
758
|
+
if (data.createTime != null) {
|
|
759
|
+
contents.createTime = __expectNonNull(__parseRfc3339DateTime(data.createTime));
|
|
760
|
+
}
|
|
761
|
+
if (data.destinationConfiguration != null) {
|
|
762
|
+
contents.destinationConfiguration = deserializeAws_restJson1DestinationConfiguration(__expectUnion(data.destinationConfiguration), context);
|
|
763
|
+
}
|
|
764
|
+
if (data.id != null) {
|
|
765
|
+
contents.id = __expectString(data.id);
|
|
766
|
+
}
|
|
767
|
+
if (data.name != null) {
|
|
768
|
+
contents.name = __expectString(data.name);
|
|
769
|
+
}
|
|
770
|
+
if (data.state != null) {
|
|
771
|
+
contents.state = __expectString(data.state);
|
|
772
|
+
}
|
|
773
|
+
if (data.tags != null) {
|
|
774
|
+
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
775
|
+
}
|
|
776
|
+
if (data.updateTime != null) {
|
|
777
|
+
contents.updateTime = __expectNonNull(__parseRfc3339DateTime(data.updateTime));
|
|
778
|
+
}
|
|
779
|
+
return contents;
|
|
780
|
+
};
|
|
781
|
+
const deserializeAws_restJson1GetLoggingConfigurationCommandError = async (output, context) => {
|
|
782
|
+
const parsedOutput = {
|
|
783
|
+
...output,
|
|
784
|
+
body: await parseErrorBody(output.body, context),
|
|
785
|
+
};
|
|
786
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
787
|
+
switch (errorCode) {
|
|
788
|
+
case "AccessDeniedException":
|
|
789
|
+
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
790
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
791
|
+
case "ResourceNotFoundException":
|
|
792
|
+
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
793
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
794
|
+
case "ValidationException":
|
|
795
|
+
case "com.amazonaws.ivschat#ValidationException":
|
|
796
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
797
|
+
default:
|
|
798
|
+
const parsedBody = parsedOutput.body;
|
|
799
|
+
throwDefaultError({
|
|
800
|
+
output,
|
|
801
|
+
parsedBody,
|
|
802
|
+
exceptionCtor: __BaseException,
|
|
803
|
+
errorCode,
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
};
|
|
515
807
|
export const deserializeAws_restJson1GetRoomCommand = async (output, context) => {
|
|
516
808
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
517
809
|
return deserializeAws_restJson1GetRoomCommandError(output, context);
|
|
@@ -529,6 +821,9 @@ export const deserializeAws_restJson1GetRoomCommand = async (output, context) =>
|
|
|
529
821
|
if (data.id != null) {
|
|
530
822
|
contents.id = __expectString(data.id);
|
|
531
823
|
}
|
|
824
|
+
if (data.loggingConfigurationIdentifiers != null) {
|
|
825
|
+
contents.loggingConfigurationIdentifiers = deserializeAws_restJson1LoggingConfigurationIdentifierList(data.loggingConfigurationIdentifiers, context);
|
|
826
|
+
}
|
|
532
827
|
if (data.maximumMessageLength != null) {
|
|
533
828
|
contents.maximumMessageLength = __expectInt32(data.maximumMessageLength);
|
|
534
829
|
}
|
|
@@ -575,6 +870,45 @@ const deserializeAws_restJson1GetRoomCommandError = async (output, context) => {
|
|
|
575
870
|
});
|
|
576
871
|
}
|
|
577
872
|
};
|
|
873
|
+
export const deserializeAws_restJson1ListLoggingConfigurationsCommand = async (output, context) => {
|
|
874
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
875
|
+
return deserializeAws_restJson1ListLoggingConfigurationsCommandError(output, context);
|
|
876
|
+
}
|
|
877
|
+
const contents = map({
|
|
878
|
+
$metadata: deserializeMetadata(output),
|
|
879
|
+
});
|
|
880
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
881
|
+
if (data.loggingConfigurations != null) {
|
|
882
|
+
contents.loggingConfigurations = deserializeAws_restJson1LoggingConfigurationList(data.loggingConfigurations, context);
|
|
883
|
+
}
|
|
884
|
+
if (data.nextToken != null) {
|
|
885
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
886
|
+
}
|
|
887
|
+
return contents;
|
|
888
|
+
};
|
|
889
|
+
const deserializeAws_restJson1ListLoggingConfigurationsCommandError = async (output, context) => {
|
|
890
|
+
const parsedOutput = {
|
|
891
|
+
...output,
|
|
892
|
+
body: await parseErrorBody(output.body, context),
|
|
893
|
+
};
|
|
894
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
895
|
+
switch (errorCode) {
|
|
896
|
+
case "AccessDeniedException":
|
|
897
|
+
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
898
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
899
|
+
case "ValidationException":
|
|
900
|
+
case "com.amazonaws.ivschat#ValidationException":
|
|
901
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
902
|
+
default:
|
|
903
|
+
const parsedBody = parsedOutput.body;
|
|
904
|
+
throwDefaultError({
|
|
905
|
+
output,
|
|
906
|
+
parsedBody,
|
|
907
|
+
exceptionCtor: __BaseException,
|
|
908
|
+
errorCode,
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
};
|
|
578
912
|
export const deserializeAws_restJson1ListRoomsCommand = async (output, context) => {
|
|
579
913
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
580
914
|
return deserializeAws_restJson1ListRoomsCommandError(output, context);
|
|
@@ -770,6 +1104,69 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
770
1104
|
});
|
|
771
1105
|
}
|
|
772
1106
|
};
|
|
1107
|
+
export const deserializeAws_restJson1UpdateLoggingConfigurationCommand = async (output, context) => {
|
|
1108
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1109
|
+
return deserializeAws_restJson1UpdateLoggingConfigurationCommandError(output, context);
|
|
1110
|
+
}
|
|
1111
|
+
const contents = map({
|
|
1112
|
+
$metadata: deserializeMetadata(output),
|
|
1113
|
+
});
|
|
1114
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1115
|
+
if (data.arn != null) {
|
|
1116
|
+
contents.arn = __expectString(data.arn);
|
|
1117
|
+
}
|
|
1118
|
+
if (data.createTime != null) {
|
|
1119
|
+
contents.createTime = __expectNonNull(__parseRfc3339DateTime(data.createTime));
|
|
1120
|
+
}
|
|
1121
|
+
if (data.destinationConfiguration != null) {
|
|
1122
|
+
contents.destinationConfiguration = deserializeAws_restJson1DestinationConfiguration(__expectUnion(data.destinationConfiguration), context);
|
|
1123
|
+
}
|
|
1124
|
+
if (data.id != null) {
|
|
1125
|
+
contents.id = __expectString(data.id);
|
|
1126
|
+
}
|
|
1127
|
+
if (data.name != null) {
|
|
1128
|
+
contents.name = __expectString(data.name);
|
|
1129
|
+
}
|
|
1130
|
+
if (data.state != null) {
|
|
1131
|
+
contents.state = __expectString(data.state);
|
|
1132
|
+
}
|
|
1133
|
+
if (data.tags != null) {
|
|
1134
|
+
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1135
|
+
}
|
|
1136
|
+
if (data.updateTime != null) {
|
|
1137
|
+
contents.updateTime = __expectNonNull(__parseRfc3339DateTime(data.updateTime));
|
|
1138
|
+
}
|
|
1139
|
+
return contents;
|
|
1140
|
+
};
|
|
1141
|
+
const deserializeAws_restJson1UpdateLoggingConfigurationCommandError = async (output, context) => {
|
|
1142
|
+
const parsedOutput = {
|
|
1143
|
+
...output,
|
|
1144
|
+
body: await parseErrorBody(output.body, context),
|
|
1145
|
+
};
|
|
1146
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1147
|
+
switch (errorCode) {
|
|
1148
|
+
case "AccessDeniedException":
|
|
1149
|
+
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
1150
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1151
|
+
case "PendingVerification":
|
|
1152
|
+
case "com.amazonaws.ivschat#PendingVerification":
|
|
1153
|
+
throw await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context);
|
|
1154
|
+
case "ResourceNotFoundException":
|
|
1155
|
+
case "com.amazonaws.ivschat#ResourceNotFoundException":
|
|
1156
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1157
|
+
case "ValidationException":
|
|
1158
|
+
case "com.amazonaws.ivschat#ValidationException":
|
|
1159
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1160
|
+
default:
|
|
1161
|
+
const parsedBody = parsedOutput.body;
|
|
1162
|
+
throwDefaultError({
|
|
1163
|
+
output,
|
|
1164
|
+
parsedBody,
|
|
1165
|
+
exceptionCtor: __BaseException,
|
|
1166
|
+
errorCode,
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
773
1170
|
export const deserializeAws_restJson1UpdateRoomCommand = async (output, context) => {
|
|
774
1171
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
775
1172
|
return deserializeAws_restJson1UpdateRoomCommandError(output, context);
|
|
@@ -787,6 +1184,9 @@ export const deserializeAws_restJson1UpdateRoomCommand = async (output, context)
|
|
|
787
1184
|
if (data.id != null) {
|
|
788
1185
|
contents.id = __expectString(data.id);
|
|
789
1186
|
}
|
|
1187
|
+
if (data.loggingConfigurationIdentifiers != null) {
|
|
1188
|
+
contents.loggingConfigurationIdentifiers = deserializeAws_restJson1LoggingConfigurationIdentifierList(data.loggingConfigurationIdentifiers, context);
|
|
1189
|
+
}
|
|
790
1190
|
if (data.maximumMessageLength != null) {
|
|
791
1191
|
contents.maximumMessageLength = __expectInt32(data.maximumMessageLength);
|
|
792
1192
|
}
|
|
@@ -974,10 +1374,8 @@ const serializeAws_restJson1ChatTokenAttributes = (input, context) => {
|
|
|
974
1374
|
if (value === null) {
|
|
975
1375
|
return acc;
|
|
976
1376
|
}
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
[key]: value,
|
|
980
|
-
};
|
|
1377
|
+
acc[key] = value;
|
|
1378
|
+
return acc;
|
|
981
1379
|
}, {});
|
|
982
1380
|
};
|
|
983
1381
|
const serializeAws_restJson1ChatTokenCapabilities = (input, context) => {
|
|
@@ -987,33 +1385,125 @@ const serializeAws_restJson1ChatTokenCapabilities = (input, context) => {
|
|
|
987
1385
|
return entry;
|
|
988
1386
|
});
|
|
989
1387
|
};
|
|
1388
|
+
const serializeAws_restJson1CloudWatchLogsDestinationConfiguration = (input, context) => {
|
|
1389
|
+
return {
|
|
1390
|
+
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
1391
|
+
};
|
|
1392
|
+
};
|
|
1393
|
+
const serializeAws_restJson1DestinationConfiguration = (input, context) => {
|
|
1394
|
+
return DestinationConfiguration.visit(input, {
|
|
1395
|
+
cloudWatchLogs: (value) => ({
|
|
1396
|
+
cloudWatchLogs: serializeAws_restJson1CloudWatchLogsDestinationConfiguration(value, context),
|
|
1397
|
+
}),
|
|
1398
|
+
firehose: (value) => ({ firehose: serializeAws_restJson1FirehoseDestinationConfiguration(value, context) }),
|
|
1399
|
+
s3: (value) => ({ s3: serializeAws_restJson1S3DestinationConfiguration(value, context) }),
|
|
1400
|
+
_: (name, value) => ({ name: value }),
|
|
1401
|
+
});
|
|
1402
|
+
};
|
|
990
1403
|
const serializeAws_restJson1EventAttributes = (input, context) => {
|
|
991
1404
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
992
1405
|
if (value === null) {
|
|
993
1406
|
return acc;
|
|
994
1407
|
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
[key]: value,
|
|
998
|
-
};
|
|
1408
|
+
acc[key] = value;
|
|
1409
|
+
return acc;
|
|
999
1410
|
}, {});
|
|
1000
1411
|
};
|
|
1412
|
+
const serializeAws_restJson1FirehoseDestinationConfiguration = (input, context) => {
|
|
1413
|
+
return {
|
|
1414
|
+
...(input.deliveryStreamName != null && { deliveryStreamName: input.deliveryStreamName }),
|
|
1415
|
+
};
|
|
1416
|
+
};
|
|
1417
|
+
const serializeAws_restJson1LoggingConfigurationIdentifierList = (input, context) => {
|
|
1418
|
+
return input
|
|
1419
|
+
.filter((e) => e != null)
|
|
1420
|
+
.map((entry) => {
|
|
1421
|
+
return entry;
|
|
1422
|
+
});
|
|
1423
|
+
};
|
|
1001
1424
|
const serializeAws_restJson1MessageReviewHandler = (input, context) => {
|
|
1002
1425
|
return {
|
|
1003
1426
|
...(input.fallbackResult != null && { fallbackResult: input.fallbackResult }),
|
|
1004
1427
|
...(input.uri != null && { uri: input.uri }),
|
|
1005
1428
|
};
|
|
1006
1429
|
};
|
|
1430
|
+
const serializeAws_restJson1S3DestinationConfiguration = (input, context) => {
|
|
1431
|
+
return {
|
|
1432
|
+
...(input.bucketName != null && { bucketName: input.bucketName }),
|
|
1433
|
+
};
|
|
1434
|
+
};
|
|
1007
1435
|
const serializeAws_restJson1Tags = (input, context) => {
|
|
1008
1436
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1009
1437
|
if (value === null) {
|
|
1010
1438
|
return acc;
|
|
1011
1439
|
}
|
|
1440
|
+
acc[key] = value;
|
|
1441
|
+
return acc;
|
|
1442
|
+
}, {});
|
|
1443
|
+
};
|
|
1444
|
+
const deserializeAws_restJson1CloudWatchLogsDestinationConfiguration = (output, context) => {
|
|
1445
|
+
return {
|
|
1446
|
+
logGroupName: __expectString(output.logGroupName),
|
|
1447
|
+
};
|
|
1448
|
+
};
|
|
1449
|
+
const deserializeAws_restJson1DestinationConfiguration = (output, context) => {
|
|
1450
|
+
if (output.cloudWatchLogs != null) {
|
|
1012
1451
|
return {
|
|
1013
|
-
|
|
1014
|
-
[key]: value,
|
|
1452
|
+
cloudWatchLogs: deserializeAws_restJson1CloudWatchLogsDestinationConfiguration(output.cloudWatchLogs, context),
|
|
1015
1453
|
};
|
|
1016
|
-
}
|
|
1454
|
+
}
|
|
1455
|
+
if (output.firehose != null) {
|
|
1456
|
+
return {
|
|
1457
|
+
firehose: deserializeAws_restJson1FirehoseDestinationConfiguration(output.firehose, context),
|
|
1458
|
+
};
|
|
1459
|
+
}
|
|
1460
|
+
if (output.s3 != null) {
|
|
1461
|
+
return {
|
|
1462
|
+
s3: deserializeAws_restJson1S3DestinationConfiguration(output.s3, context),
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1466
|
+
};
|
|
1467
|
+
const deserializeAws_restJson1FirehoseDestinationConfiguration = (output, context) => {
|
|
1468
|
+
return {
|
|
1469
|
+
deliveryStreamName: __expectString(output.deliveryStreamName),
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
const deserializeAws_restJson1LoggingConfigurationIdentifierList = (output, context) => {
|
|
1473
|
+
const retVal = (output || [])
|
|
1474
|
+
.filter((e) => e != null)
|
|
1475
|
+
.map((entry) => {
|
|
1476
|
+
if (entry === null) {
|
|
1477
|
+
return null;
|
|
1478
|
+
}
|
|
1479
|
+
return __expectString(entry);
|
|
1480
|
+
});
|
|
1481
|
+
return retVal;
|
|
1482
|
+
};
|
|
1483
|
+
const deserializeAws_restJson1LoggingConfigurationList = (output, context) => {
|
|
1484
|
+
const retVal = (output || [])
|
|
1485
|
+
.filter((e) => e != null)
|
|
1486
|
+
.map((entry) => {
|
|
1487
|
+
if (entry === null) {
|
|
1488
|
+
return null;
|
|
1489
|
+
}
|
|
1490
|
+
return deserializeAws_restJson1LoggingConfigurationSummary(entry, context);
|
|
1491
|
+
});
|
|
1492
|
+
return retVal;
|
|
1493
|
+
};
|
|
1494
|
+
const deserializeAws_restJson1LoggingConfigurationSummary = (output, context) => {
|
|
1495
|
+
return {
|
|
1496
|
+
arn: __expectString(output.arn),
|
|
1497
|
+
createTime: output.createTime != null ? __expectNonNull(__parseRfc3339DateTime(output.createTime)) : undefined,
|
|
1498
|
+
destinationConfiguration: output.destinationConfiguration != null
|
|
1499
|
+
? deserializeAws_restJson1DestinationConfiguration(__expectUnion(output.destinationConfiguration), context)
|
|
1500
|
+
: undefined,
|
|
1501
|
+
id: __expectString(output.id),
|
|
1502
|
+
name: __expectString(output.name),
|
|
1503
|
+
state: __expectString(output.state),
|
|
1504
|
+
tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
|
|
1505
|
+
updateTime: output.updateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.updateTime)) : undefined,
|
|
1506
|
+
};
|
|
1017
1507
|
};
|
|
1018
1508
|
const deserializeAws_restJson1MessageReviewHandler = (output, context) => {
|
|
1019
1509
|
return {
|
|
@@ -1037,6 +1527,9 @@ const deserializeAws_restJson1RoomSummary = (output, context) => {
|
|
|
1037
1527
|
arn: __expectString(output.arn),
|
|
1038
1528
|
createTime: output.createTime != null ? __expectNonNull(__parseRfc3339DateTime(output.createTime)) : undefined,
|
|
1039
1529
|
id: __expectString(output.id),
|
|
1530
|
+
loggingConfigurationIdentifiers: output.loggingConfigurationIdentifiers != null
|
|
1531
|
+
? deserializeAws_restJson1LoggingConfigurationIdentifierList(output.loggingConfigurationIdentifiers, context)
|
|
1532
|
+
: undefined,
|
|
1040
1533
|
messageReviewHandler: output.messageReviewHandler != null
|
|
1041
1534
|
? deserializeAws_restJson1MessageReviewHandler(output.messageReviewHandler, context)
|
|
1042
1535
|
: undefined,
|
|
@@ -1045,15 +1538,18 @@ const deserializeAws_restJson1RoomSummary = (output, context) => {
|
|
|
1045
1538
|
updateTime: output.updateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.updateTime)) : undefined,
|
|
1046
1539
|
};
|
|
1047
1540
|
};
|
|
1541
|
+
const deserializeAws_restJson1S3DestinationConfiguration = (output, context) => {
|
|
1542
|
+
return {
|
|
1543
|
+
bucketName: __expectString(output.bucketName),
|
|
1544
|
+
};
|
|
1545
|
+
};
|
|
1048
1546
|
const deserializeAws_restJson1Tags = (output, context) => {
|
|
1049
1547
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1050
1548
|
if (value === null) {
|
|
1051
1549
|
return acc;
|
|
1052
1550
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
[key]: __expectString(value),
|
|
1056
|
-
};
|
|
1551
|
+
acc[key] = __expectString(value);
|
|
1552
|
+
return acc;
|
|
1057
1553
|
}, {});
|
|
1058
1554
|
};
|
|
1059
1555
|
const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
|