@aws-sdk/client-ivschat 3.212.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.
Files changed (49) hide show
  1. package/README.md +37 -5
  2. package/dist-cjs/Ivschat.js +75 -0
  3. package/dist-cjs/commands/CreateLoggingConfigurationCommand.js +46 -0
  4. package/dist-cjs/commands/DeleteLoggingConfigurationCommand.js +46 -0
  5. package/dist-cjs/commands/GetLoggingConfigurationCommand.js +46 -0
  6. package/dist-cjs/commands/ListLoggingConfigurationsCommand.js +46 -0
  7. package/dist-cjs/commands/UpdateLoggingConfigurationCommand.js +46 -0
  8. package/dist-cjs/commands/index.js +5 -0
  9. package/dist-cjs/models/models_0.js +121 -6
  10. package/dist-cjs/pagination/ListLoggingConfigurationsPaginator.js +36 -0
  11. package/dist-cjs/pagination/index.js +1 -0
  12. package/dist-cjs/protocols/Aws_restJson1.js +515 -1
  13. package/dist-es/Ivschat.js +75 -0
  14. package/dist-es/commands/CreateLoggingConfigurationCommand.js +42 -0
  15. package/dist-es/commands/DeleteLoggingConfigurationCommand.js +42 -0
  16. package/dist-es/commands/GetLoggingConfigurationCommand.js +42 -0
  17. package/dist-es/commands/ListLoggingConfigurationsCommand.js +42 -0
  18. package/dist-es/commands/UpdateLoggingConfigurationCommand.js +42 -0
  19. package/dist-es/commands/index.js +5 -0
  20. package/dist-es/models/models_0.js +105 -5
  21. package/dist-es/pagination/ListLoggingConfigurationsPaginator.js +32 -0
  22. package/dist-es/pagination/index.js +1 -0
  23. package/dist-es/protocols/Aws_restJson1.js +506 -2
  24. package/dist-types/Ivschat.d.ts +84 -8
  25. package/dist-types/IvschatClient.d.ts +44 -7
  26. package/dist-types/commands/CreateChatTokenCommand.d.ts +10 -3
  27. package/dist-types/commands/CreateLoggingConfigurationCommand.d.ts +38 -0
  28. package/dist-types/commands/DeleteLoggingConfigurationCommand.d.ts +37 -0
  29. package/dist-types/commands/GetLoggingConfigurationCommand.d.ts +37 -0
  30. package/dist-types/commands/ListLoggingConfigurationsCommand.d.ts +38 -0
  31. package/dist-types/commands/UpdateLoggingConfigurationCommand.d.ts +37 -0
  32. package/dist-types/commands/index.d.ts +5 -0
  33. package/dist-types/models/models_0.d.ts +473 -37
  34. package/dist-types/pagination/ListLoggingConfigurationsPaginator.d.ts +4 -0
  35. package/dist-types/pagination/index.d.ts +1 -0
  36. package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
  37. package/dist-types/ts3.4/Ivschat.d.ts +85 -0
  38. package/dist-types/ts3.4/IvschatClient.d.ts +30 -0
  39. package/dist-types/ts3.4/commands/CreateLoggingConfigurationCommand.d.ts +41 -0
  40. package/dist-types/ts3.4/commands/DeleteLoggingConfigurationCommand.d.ts +37 -0
  41. package/dist-types/ts3.4/commands/GetLoggingConfigurationCommand.d.ts +41 -0
  42. package/dist-types/ts3.4/commands/ListLoggingConfigurationsCommand.d.ts +41 -0
  43. package/dist-types/ts3.4/commands/UpdateLoggingConfigurationCommand.d.ts +41 -0
  44. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  45. package/dist-types/ts3.4/models/models_0.d.ts +184 -9
  46. package/dist-types/ts3.4/pagination/ListLoggingConfigurationsPaginator.d.ts +11 -0
  47. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  48. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  49. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UpdateRoomCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendEventCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRoomsCommand = exports.deserializeAws_restJson1GetRoomCommand = exports.deserializeAws_restJson1DisconnectUserCommand = exports.deserializeAws_restJson1DeleteRoomCommand = exports.deserializeAws_restJson1DeleteMessageCommand = exports.deserializeAws_restJson1CreateRoomCommand = exports.deserializeAws_restJson1CreateChatTokenCommand = exports.serializeAws_restJson1UpdateRoomCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SendEventCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRoomsCommand = exports.serializeAws_restJson1GetRoomCommand = exports.serializeAws_restJson1DisconnectUserCommand = exports.serializeAws_restJson1DeleteRoomCommand = exports.serializeAws_restJson1DeleteMessageCommand = exports.serializeAws_restJson1CreateRoomCommand = exports.serializeAws_restJson1CreateChatTokenCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateRoomCommand = exports.deserializeAws_restJson1UpdateLoggingConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendEventCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRoomsCommand = exports.deserializeAws_restJson1ListLoggingConfigurationsCommand = exports.deserializeAws_restJson1GetRoomCommand = exports.deserializeAws_restJson1GetLoggingConfigurationCommand = exports.deserializeAws_restJson1DisconnectUserCommand = exports.deserializeAws_restJson1DeleteRoomCommand = exports.deserializeAws_restJson1DeleteMessageCommand = exports.deserializeAws_restJson1DeleteLoggingConfigurationCommand = exports.deserializeAws_restJson1CreateRoomCommand = exports.deserializeAws_restJson1CreateLoggingConfigurationCommand = exports.deserializeAws_restJson1CreateChatTokenCommand = exports.serializeAws_restJson1UpdateRoomCommand = exports.serializeAws_restJson1UpdateLoggingConfigurationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SendEventCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRoomsCommand = exports.serializeAws_restJson1ListLoggingConfigurationsCommand = exports.serializeAws_restJson1GetRoomCommand = exports.serializeAws_restJson1GetLoggingConfigurationCommand = exports.serializeAws_restJson1DisconnectUserCommand = exports.serializeAws_restJson1DeleteRoomCommand = exports.serializeAws_restJson1DeleteMessageCommand = exports.serializeAws_restJson1DeleteLoggingConfigurationCommand = exports.serializeAws_restJson1CreateRoomCommand = exports.serializeAws_restJson1CreateLoggingConfigurationCommand = exports.serializeAws_restJson1CreateChatTokenCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const IvschatServiceException_1 = require("../models/IvschatServiceException");
@@ -34,6 +34,31 @@ const serializeAws_restJson1CreateChatTokenCommand = async (input, context) => {
34
34
  });
35
35
  };
36
36
  exports.serializeAws_restJson1CreateChatTokenCommand = serializeAws_restJson1CreateChatTokenCommand;
37
+ const serializeAws_restJson1CreateLoggingConfigurationCommand = async (input, context) => {
38
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const headers = {
40
+ "content-type": "application/json",
41
+ };
42
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLoggingConfiguration";
43
+ let body;
44
+ body = JSON.stringify({
45
+ ...(input.destinationConfiguration != null && {
46
+ destinationConfiguration: serializeAws_restJson1DestinationConfiguration(input.destinationConfiguration, context),
47
+ }),
48
+ ...(input.name != null && { name: input.name }),
49
+ ...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
50
+ });
51
+ return new protocol_http_1.HttpRequest({
52
+ protocol,
53
+ hostname,
54
+ port,
55
+ method: "POST",
56
+ headers,
57
+ path: resolvedPath,
58
+ body,
59
+ });
60
+ };
61
+ exports.serializeAws_restJson1CreateLoggingConfigurationCommand = serializeAws_restJson1CreateLoggingConfigurationCommand;
37
62
  const serializeAws_restJson1CreateRoomCommand = async (input, context) => {
38
63
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
64
  const headers = {
@@ -42,6 +67,9 @@ const serializeAws_restJson1CreateRoomCommand = async (input, context) => {
42
67
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateRoom";
43
68
  let body;
44
69
  body = JSON.stringify({
70
+ ...(input.loggingConfigurationIdentifiers != null && {
71
+ loggingConfigurationIdentifiers: serializeAws_restJson1LoggingConfigurationIdentifierList(input.loggingConfigurationIdentifiers, context),
72
+ }),
45
73
  ...(input.maximumMessageLength != null && { maximumMessageLength: input.maximumMessageLength }),
46
74
  ...(input.maximumMessageRatePerSecond != null && {
47
75
  maximumMessageRatePerSecond: input.maximumMessageRatePerSecond,
@@ -63,6 +91,27 @@ const serializeAws_restJson1CreateRoomCommand = async (input, context) => {
63
91
  });
64
92
  };
65
93
  exports.serializeAws_restJson1CreateRoomCommand = serializeAws_restJson1CreateRoomCommand;
94
+ const serializeAws_restJson1DeleteLoggingConfigurationCommand = async (input, context) => {
95
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
96
+ const headers = {
97
+ "content-type": "application/json",
98
+ };
99
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLoggingConfiguration";
100
+ let body;
101
+ body = JSON.stringify({
102
+ ...(input.identifier != null && { identifier: input.identifier }),
103
+ });
104
+ return new protocol_http_1.HttpRequest({
105
+ protocol,
106
+ hostname,
107
+ port,
108
+ method: "POST",
109
+ headers,
110
+ path: resolvedPath,
111
+ body,
112
+ });
113
+ };
114
+ exports.serializeAws_restJson1DeleteLoggingConfigurationCommand = serializeAws_restJson1DeleteLoggingConfigurationCommand;
66
115
  const serializeAws_restJson1DeleteMessageCommand = async (input, context) => {
67
116
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
117
  const headers = {
@@ -130,6 +179,27 @@ const serializeAws_restJson1DisconnectUserCommand = async (input, context) => {
130
179
  });
131
180
  };
132
181
  exports.serializeAws_restJson1DisconnectUserCommand = serializeAws_restJson1DisconnectUserCommand;
182
+ const serializeAws_restJson1GetLoggingConfigurationCommand = async (input, context) => {
183
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const headers = {
185
+ "content-type": "application/json",
186
+ };
187
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLoggingConfiguration";
188
+ let body;
189
+ body = JSON.stringify({
190
+ ...(input.identifier != null && { identifier: input.identifier }),
191
+ });
192
+ return new protocol_http_1.HttpRequest({
193
+ protocol,
194
+ hostname,
195
+ port,
196
+ method: "POST",
197
+ headers,
198
+ path: resolvedPath,
199
+ body,
200
+ });
201
+ };
202
+ exports.serializeAws_restJson1GetLoggingConfigurationCommand = serializeAws_restJson1GetLoggingConfigurationCommand;
133
203
  const serializeAws_restJson1GetRoomCommand = async (input, context) => {
134
204
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
205
  const headers = {
@@ -151,6 +221,28 @@ const serializeAws_restJson1GetRoomCommand = async (input, context) => {
151
221
  });
152
222
  };
153
223
  exports.serializeAws_restJson1GetRoomCommand = serializeAws_restJson1GetRoomCommand;
224
+ const serializeAws_restJson1ListLoggingConfigurationsCommand = async (input, context) => {
225
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
226
+ const headers = {
227
+ "content-type": "application/json",
228
+ };
229
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListLoggingConfigurations";
230
+ let body;
231
+ body = JSON.stringify({
232
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
233
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
234
+ });
235
+ return new protocol_http_1.HttpRequest({
236
+ protocol,
237
+ hostname,
238
+ port,
239
+ method: "POST",
240
+ headers,
241
+ path: resolvedPath,
242
+ body,
243
+ });
244
+ };
245
+ exports.serializeAws_restJson1ListLoggingConfigurationsCommand = serializeAws_restJson1ListLoggingConfigurationsCommand;
154
246
  const serializeAws_restJson1ListRoomsCommand = async (input, context) => {
155
247
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
248
  const headers = {
@@ -159,6 +251,9 @@ const serializeAws_restJson1ListRoomsCommand = async (input, context) => {
159
251
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListRooms";
160
252
  let body;
161
253
  body = JSON.stringify({
254
+ ...(input.loggingConfigurationIdentifier != null && {
255
+ loggingConfigurationIdentifier: input.loggingConfigurationIdentifier,
256
+ }),
162
257
  ...(input.maxResults != null && { maxResults: input.maxResults }),
163
258
  ...(input.messageReviewHandlerUri != null && { messageReviewHandlerUri: input.messageReviewHandlerUri }),
164
259
  ...(input.name != null && { name: input.name }),
@@ -258,6 +353,31 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
258
353
  });
259
354
  };
260
355
  exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
356
+ const serializeAws_restJson1UpdateLoggingConfigurationCommand = async (input, context) => {
357
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
358
+ const headers = {
359
+ "content-type": "application/json",
360
+ };
361
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLoggingConfiguration";
362
+ let body;
363
+ body = JSON.stringify({
364
+ ...(input.destinationConfiguration != null && {
365
+ destinationConfiguration: serializeAws_restJson1DestinationConfiguration(input.destinationConfiguration, context),
366
+ }),
367
+ ...(input.identifier != null && { identifier: input.identifier }),
368
+ ...(input.name != null && { name: input.name }),
369
+ });
370
+ return new protocol_http_1.HttpRequest({
371
+ protocol,
372
+ hostname,
373
+ port,
374
+ method: "POST",
375
+ headers,
376
+ path: resolvedPath,
377
+ body,
378
+ });
379
+ };
380
+ exports.serializeAws_restJson1UpdateLoggingConfigurationCommand = serializeAws_restJson1UpdateLoggingConfigurationCommand;
261
381
  const serializeAws_restJson1UpdateRoomCommand = async (input, context) => {
262
382
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
263
383
  const headers = {
@@ -267,6 +387,9 @@ const serializeAws_restJson1UpdateRoomCommand = async (input, context) => {
267
387
  let body;
268
388
  body = JSON.stringify({
269
389
  ...(input.identifier != null && { identifier: input.identifier }),
390
+ ...(input.loggingConfigurationIdentifiers != null && {
391
+ loggingConfigurationIdentifiers: serializeAws_restJson1LoggingConfigurationIdentifierList(input.loggingConfigurationIdentifiers, context),
392
+ }),
270
393
  ...(input.maximumMessageLength != null && { maximumMessageLength: input.maximumMessageLength }),
271
394
  ...(input.maximumMessageRatePerSecond != null && {
272
395
  maximumMessageRatePerSecond: input.maximumMessageRatePerSecond,
@@ -336,6 +459,76 @@ const deserializeAws_restJson1CreateChatTokenCommandError = async (output, conte
336
459
  });
337
460
  }
338
461
  };
462
+ const deserializeAws_restJson1CreateLoggingConfigurationCommand = async (output, context) => {
463
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
464
+ return deserializeAws_restJson1CreateLoggingConfigurationCommandError(output, context);
465
+ }
466
+ const contents = map({
467
+ $metadata: deserializeMetadata(output),
468
+ });
469
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
470
+ if (data.arn != null) {
471
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
472
+ }
473
+ if (data.createTime != null) {
474
+ contents.createTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.createTime));
475
+ }
476
+ if (data.destinationConfiguration != null) {
477
+ contents.destinationConfiguration = deserializeAws_restJson1DestinationConfiguration((0, smithy_client_1.expectUnion)(data.destinationConfiguration), context);
478
+ }
479
+ if (data.id != null) {
480
+ contents.id = (0, smithy_client_1.expectString)(data.id);
481
+ }
482
+ if (data.name != null) {
483
+ contents.name = (0, smithy_client_1.expectString)(data.name);
484
+ }
485
+ if (data.state != null) {
486
+ contents.state = (0, smithy_client_1.expectString)(data.state);
487
+ }
488
+ if (data.tags != null) {
489
+ contents.tags = deserializeAws_restJson1Tags(data.tags, context);
490
+ }
491
+ if (data.updateTime != null) {
492
+ contents.updateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.updateTime));
493
+ }
494
+ return contents;
495
+ };
496
+ exports.deserializeAws_restJson1CreateLoggingConfigurationCommand = deserializeAws_restJson1CreateLoggingConfigurationCommand;
497
+ const deserializeAws_restJson1CreateLoggingConfigurationCommandError = async (output, context) => {
498
+ const parsedOutput = {
499
+ ...output,
500
+ body: await parseErrorBody(output.body, context),
501
+ };
502
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
503
+ switch (errorCode) {
504
+ case "AccessDeniedException":
505
+ case "com.amazonaws.ivschat#AccessDeniedException":
506
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
507
+ case "ConflictException":
508
+ case "com.amazonaws.ivschat#ConflictException":
509
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
510
+ case "PendingVerification":
511
+ case "com.amazonaws.ivschat#PendingVerification":
512
+ throw await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context);
513
+ case "ResourceNotFoundException":
514
+ case "com.amazonaws.ivschat#ResourceNotFoundException":
515
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
516
+ case "ServiceQuotaExceededException":
517
+ case "com.amazonaws.ivschat#ServiceQuotaExceededException":
518
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
519
+ case "ValidationException":
520
+ case "com.amazonaws.ivschat#ValidationException":
521
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
522
+ default:
523
+ const parsedBody = parsedOutput.body;
524
+ (0, smithy_client_1.throwDefaultError)({
525
+ output,
526
+ parsedBody,
527
+ exceptionCtor: IvschatServiceException_1.IvschatServiceException,
528
+ errorCode,
529
+ });
530
+ }
531
+ };
339
532
  const deserializeAws_restJson1CreateRoomCommand = async (output, context) => {
340
533
  if (output.statusCode !== 200 && output.statusCode >= 300) {
341
534
  return deserializeAws_restJson1CreateRoomCommandError(output, context);
@@ -353,6 +546,9 @@ const deserializeAws_restJson1CreateRoomCommand = async (output, context) => {
353
546
  if (data.id != null) {
354
547
  contents.id = (0, smithy_client_1.expectString)(data.id);
355
548
  }
549
+ if (data.loggingConfigurationIdentifiers != null) {
550
+ contents.loggingConfigurationIdentifiers = deserializeAws_restJson1LoggingConfigurationIdentifierList(data.loggingConfigurationIdentifiers, context);
551
+ }
356
552
  if (data.maximumMessageLength != null) {
357
553
  contents.maximumMessageLength = (0, smithy_client_1.expectInt32)(data.maximumMessageLength);
358
554
  }
@@ -409,6 +605,49 @@ const deserializeAws_restJson1CreateRoomCommandError = async (output, context) =
409
605
  });
410
606
  }
411
607
  };
608
+ const deserializeAws_restJson1DeleteLoggingConfigurationCommand = async (output, context) => {
609
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
610
+ return deserializeAws_restJson1DeleteLoggingConfigurationCommandError(output, context);
611
+ }
612
+ const contents = map({
613
+ $metadata: deserializeMetadata(output),
614
+ });
615
+ await collectBody(output.body, context);
616
+ return contents;
617
+ };
618
+ exports.deserializeAws_restJson1DeleteLoggingConfigurationCommand = deserializeAws_restJson1DeleteLoggingConfigurationCommand;
619
+ const deserializeAws_restJson1DeleteLoggingConfigurationCommandError = async (output, context) => {
620
+ const parsedOutput = {
621
+ ...output,
622
+ body: await parseErrorBody(output.body, context),
623
+ };
624
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
625
+ switch (errorCode) {
626
+ case "AccessDeniedException":
627
+ case "com.amazonaws.ivschat#AccessDeniedException":
628
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
629
+ case "ConflictException":
630
+ case "com.amazonaws.ivschat#ConflictException":
631
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
632
+ case "PendingVerification":
633
+ case "com.amazonaws.ivschat#PendingVerification":
634
+ throw await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context);
635
+ case "ResourceNotFoundException":
636
+ case "com.amazonaws.ivschat#ResourceNotFoundException":
637
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
638
+ case "ValidationException":
639
+ case "com.amazonaws.ivschat#ValidationException":
640
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
641
+ default:
642
+ const parsedBody = parsedOutput.body;
643
+ (0, smithy_client_1.throwDefaultError)({
644
+ output,
645
+ parsedBody,
646
+ exceptionCtor: IvschatServiceException_1.IvschatServiceException,
647
+ errorCode,
648
+ });
649
+ }
650
+ };
412
651
  const deserializeAws_restJson1DeleteMessageCommand = async (output, context) => {
413
652
  if (output.statusCode !== 200 && output.statusCode >= 300) {
414
653
  return deserializeAws_restJson1DeleteMessageCommandError(output, context);
@@ -532,6 +771,67 @@ const deserializeAws_restJson1DisconnectUserCommandError = async (output, contex
532
771
  });
533
772
  }
534
773
  };
774
+ const deserializeAws_restJson1GetLoggingConfigurationCommand = async (output, context) => {
775
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
776
+ return deserializeAws_restJson1GetLoggingConfigurationCommandError(output, context);
777
+ }
778
+ const contents = map({
779
+ $metadata: deserializeMetadata(output),
780
+ });
781
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
782
+ if (data.arn != null) {
783
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
784
+ }
785
+ if (data.createTime != null) {
786
+ contents.createTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.createTime));
787
+ }
788
+ if (data.destinationConfiguration != null) {
789
+ contents.destinationConfiguration = deserializeAws_restJson1DestinationConfiguration((0, smithy_client_1.expectUnion)(data.destinationConfiguration), context);
790
+ }
791
+ if (data.id != null) {
792
+ contents.id = (0, smithy_client_1.expectString)(data.id);
793
+ }
794
+ if (data.name != null) {
795
+ contents.name = (0, smithy_client_1.expectString)(data.name);
796
+ }
797
+ if (data.state != null) {
798
+ contents.state = (0, smithy_client_1.expectString)(data.state);
799
+ }
800
+ if (data.tags != null) {
801
+ contents.tags = deserializeAws_restJson1Tags(data.tags, context);
802
+ }
803
+ if (data.updateTime != null) {
804
+ contents.updateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.updateTime));
805
+ }
806
+ return contents;
807
+ };
808
+ exports.deserializeAws_restJson1GetLoggingConfigurationCommand = deserializeAws_restJson1GetLoggingConfigurationCommand;
809
+ const deserializeAws_restJson1GetLoggingConfigurationCommandError = async (output, context) => {
810
+ const parsedOutput = {
811
+ ...output,
812
+ body: await parseErrorBody(output.body, context),
813
+ };
814
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
815
+ switch (errorCode) {
816
+ case "AccessDeniedException":
817
+ case "com.amazonaws.ivschat#AccessDeniedException":
818
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
819
+ case "ResourceNotFoundException":
820
+ case "com.amazonaws.ivschat#ResourceNotFoundException":
821
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
822
+ case "ValidationException":
823
+ case "com.amazonaws.ivschat#ValidationException":
824
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
825
+ default:
826
+ const parsedBody = parsedOutput.body;
827
+ (0, smithy_client_1.throwDefaultError)({
828
+ output,
829
+ parsedBody,
830
+ exceptionCtor: IvschatServiceException_1.IvschatServiceException,
831
+ errorCode,
832
+ });
833
+ }
834
+ };
535
835
  const deserializeAws_restJson1GetRoomCommand = async (output, context) => {
536
836
  if (output.statusCode !== 200 && output.statusCode >= 300) {
537
837
  return deserializeAws_restJson1GetRoomCommandError(output, context);
@@ -549,6 +849,9 @@ const deserializeAws_restJson1GetRoomCommand = async (output, context) => {
549
849
  if (data.id != null) {
550
850
  contents.id = (0, smithy_client_1.expectString)(data.id);
551
851
  }
852
+ if (data.loggingConfigurationIdentifiers != null) {
853
+ contents.loggingConfigurationIdentifiers = deserializeAws_restJson1LoggingConfigurationIdentifierList(data.loggingConfigurationIdentifiers, context);
854
+ }
552
855
  if (data.maximumMessageLength != null) {
553
856
  contents.maximumMessageLength = (0, smithy_client_1.expectInt32)(data.maximumMessageLength);
554
857
  }
@@ -596,6 +899,46 @@ const deserializeAws_restJson1GetRoomCommandError = async (output, context) => {
596
899
  });
597
900
  }
598
901
  };
902
+ const deserializeAws_restJson1ListLoggingConfigurationsCommand = async (output, context) => {
903
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
904
+ return deserializeAws_restJson1ListLoggingConfigurationsCommandError(output, context);
905
+ }
906
+ const contents = map({
907
+ $metadata: deserializeMetadata(output),
908
+ });
909
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
910
+ if (data.loggingConfigurations != null) {
911
+ contents.loggingConfigurations = deserializeAws_restJson1LoggingConfigurationList(data.loggingConfigurations, context);
912
+ }
913
+ if (data.nextToken != null) {
914
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
915
+ }
916
+ return contents;
917
+ };
918
+ exports.deserializeAws_restJson1ListLoggingConfigurationsCommand = deserializeAws_restJson1ListLoggingConfigurationsCommand;
919
+ const deserializeAws_restJson1ListLoggingConfigurationsCommandError = async (output, context) => {
920
+ const parsedOutput = {
921
+ ...output,
922
+ body: await parseErrorBody(output.body, context),
923
+ };
924
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
925
+ switch (errorCode) {
926
+ case "AccessDeniedException":
927
+ case "com.amazonaws.ivschat#AccessDeniedException":
928
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
929
+ case "ValidationException":
930
+ case "com.amazonaws.ivschat#ValidationException":
931
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
932
+ default:
933
+ const parsedBody = parsedOutput.body;
934
+ (0, smithy_client_1.throwDefaultError)({
935
+ output,
936
+ parsedBody,
937
+ exceptionCtor: IvschatServiceException_1.IvschatServiceException,
938
+ errorCode,
939
+ });
940
+ }
941
+ };
599
942
  const deserializeAws_restJson1ListRoomsCommand = async (output, context) => {
600
943
  if (output.statusCode !== 200 && output.statusCode >= 300) {
601
944
  return deserializeAws_restJson1ListRoomsCommandError(output, context);
@@ -796,6 +1139,70 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
796
1139
  });
797
1140
  }
798
1141
  };
1142
+ const deserializeAws_restJson1UpdateLoggingConfigurationCommand = async (output, context) => {
1143
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1144
+ return deserializeAws_restJson1UpdateLoggingConfigurationCommandError(output, context);
1145
+ }
1146
+ const contents = map({
1147
+ $metadata: deserializeMetadata(output),
1148
+ });
1149
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1150
+ if (data.arn != null) {
1151
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
1152
+ }
1153
+ if (data.createTime != null) {
1154
+ contents.createTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.createTime));
1155
+ }
1156
+ if (data.destinationConfiguration != null) {
1157
+ contents.destinationConfiguration = deserializeAws_restJson1DestinationConfiguration((0, smithy_client_1.expectUnion)(data.destinationConfiguration), context);
1158
+ }
1159
+ if (data.id != null) {
1160
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1161
+ }
1162
+ if (data.name != null) {
1163
+ contents.name = (0, smithy_client_1.expectString)(data.name);
1164
+ }
1165
+ if (data.state != null) {
1166
+ contents.state = (0, smithy_client_1.expectString)(data.state);
1167
+ }
1168
+ if (data.tags != null) {
1169
+ contents.tags = deserializeAws_restJson1Tags(data.tags, context);
1170
+ }
1171
+ if (data.updateTime != null) {
1172
+ contents.updateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.updateTime));
1173
+ }
1174
+ return contents;
1175
+ };
1176
+ exports.deserializeAws_restJson1UpdateLoggingConfigurationCommand = deserializeAws_restJson1UpdateLoggingConfigurationCommand;
1177
+ const deserializeAws_restJson1UpdateLoggingConfigurationCommandError = async (output, context) => {
1178
+ const parsedOutput = {
1179
+ ...output,
1180
+ body: await parseErrorBody(output.body, context),
1181
+ };
1182
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1183
+ switch (errorCode) {
1184
+ case "AccessDeniedException":
1185
+ case "com.amazonaws.ivschat#AccessDeniedException":
1186
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1187
+ case "PendingVerification":
1188
+ case "com.amazonaws.ivschat#PendingVerification":
1189
+ throw await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context);
1190
+ case "ResourceNotFoundException":
1191
+ case "com.amazonaws.ivschat#ResourceNotFoundException":
1192
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1193
+ case "ValidationException":
1194
+ case "com.amazonaws.ivschat#ValidationException":
1195
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1196
+ default:
1197
+ const parsedBody = parsedOutput.body;
1198
+ (0, smithy_client_1.throwDefaultError)({
1199
+ output,
1200
+ parsedBody,
1201
+ exceptionCtor: IvschatServiceException_1.IvschatServiceException,
1202
+ errorCode,
1203
+ });
1204
+ }
1205
+ };
799
1206
  const deserializeAws_restJson1UpdateRoomCommand = async (output, context) => {
800
1207
  if (output.statusCode !== 200 && output.statusCode >= 300) {
801
1208
  return deserializeAws_restJson1UpdateRoomCommandError(output, context);
@@ -813,6 +1220,9 @@ const deserializeAws_restJson1UpdateRoomCommand = async (output, context) => {
813
1220
  if (data.id != null) {
814
1221
  contents.id = (0, smithy_client_1.expectString)(data.id);
815
1222
  }
1223
+ if (data.loggingConfigurationIdentifiers != null) {
1224
+ contents.loggingConfigurationIdentifiers = deserializeAws_restJson1LoggingConfigurationIdentifierList(data.loggingConfigurationIdentifiers, context);
1225
+ }
816
1226
  if (data.maximumMessageLength != null) {
817
1227
  contents.maximumMessageLength = (0, smithy_client_1.expectInt32)(data.maximumMessageLength);
818
1228
  }
@@ -1012,6 +1422,21 @@ const serializeAws_restJson1ChatTokenCapabilities = (input, context) => {
1012
1422
  return entry;
1013
1423
  });
1014
1424
  };
1425
+ const serializeAws_restJson1CloudWatchLogsDestinationConfiguration = (input, context) => {
1426
+ return {
1427
+ ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
1428
+ };
1429
+ };
1430
+ const serializeAws_restJson1DestinationConfiguration = (input, context) => {
1431
+ return models_0_1.DestinationConfiguration.visit(input, {
1432
+ cloudWatchLogs: (value) => ({
1433
+ cloudWatchLogs: serializeAws_restJson1CloudWatchLogsDestinationConfiguration(value, context),
1434
+ }),
1435
+ firehose: (value) => ({ firehose: serializeAws_restJson1FirehoseDestinationConfiguration(value, context) }),
1436
+ s3: (value) => ({ s3: serializeAws_restJson1S3DestinationConfiguration(value, context) }),
1437
+ _: (name, value) => ({ name: value }),
1438
+ });
1439
+ };
1015
1440
  const serializeAws_restJson1EventAttributes = (input, context) => {
1016
1441
  return Object.entries(input).reduce((acc, [key, value]) => {
1017
1442
  if (value === null) {
@@ -1021,12 +1446,29 @@ const serializeAws_restJson1EventAttributes = (input, context) => {
1021
1446
  return acc;
1022
1447
  }, {});
1023
1448
  };
1449
+ const serializeAws_restJson1FirehoseDestinationConfiguration = (input, context) => {
1450
+ return {
1451
+ ...(input.deliveryStreamName != null && { deliveryStreamName: input.deliveryStreamName }),
1452
+ };
1453
+ };
1454
+ const serializeAws_restJson1LoggingConfigurationIdentifierList = (input, context) => {
1455
+ return input
1456
+ .filter((e) => e != null)
1457
+ .map((entry) => {
1458
+ return entry;
1459
+ });
1460
+ };
1024
1461
  const serializeAws_restJson1MessageReviewHandler = (input, context) => {
1025
1462
  return {
1026
1463
  ...(input.fallbackResult != null && { fallbackResult: input.fallbackResult }),
1027
1464
  ...(input.uri != null && { uri: input.uri }),
1028
1465
  };
1029
1466
  };
1467
+ const serializeAws_restJson1S3DestinationConfiguration = (input, context) => {
1468
+ return {
1469
+ ...(input.bucketName != null && { bucketName: input.bucketName }),
1470
+ };
1471
+ };
1030
1472
  const serializeAws_restJson1Tags = (input, context) => {
1031
1473
  return Object.entries(input).reduce((acc, [key, value]) => {
1032
1474
  if (value === null) {
@@ -1036,6 +1478,70 @@ const serializeAws_restJson1Tags = (input, context) => {
1036
1478
  return acc;
1037
1479
  }, {});
1038
1480
  };
1481
+ const deserializeAws_restJson1CloudWatchLogsDestinationConfiguration = (output, context) => {
1482
+ return {
1483
+ logGroupName: (0, smithy_client_1.expectString)(output.logGroupName),
1484
+ };
1485
+ };
1486
+ const deserializeAws_restJson1DestinationConfiguration = (output, context) => {
1487
+ if (output.cloudWatchLogs != null) {
1488
+ return {
1489
+ cloudWatchLogs: deserializeAws_restJson1CloudWatchLogsDestinationConfiguration(output.cloudWatchLogs, context),
1490
+ };
1491
+ }
1492
+ if (output.firehose != null) {
1493
+ return {
1494
+ firehose: deserializeAws_restJson1FirehoseDestinationConfiguration(output.firehose, context),
1495
+ };
1496
+ }
1497
+ if (output.s3 != null) {
1498
+ return {
1499
+ s3: deserializeAws_restJson1S3DestinationConfiguration(output.s3, context),
1500
+ };
1501
+ }
1502
+ return { $unknown: Object.entries(output)[0] };
1503
+ };
1504
+ const deserializeAws_restJson1FirehoseDestinationConfiguration = (output, context) => {
1505
+ return {
1506
+ deliveryStreamName: (0, smithy_client_1.expectString)(output.deliveryStreamName),
1507
+ };
1508
+ };
1509
+ const deserializeAws_restJson1LoggingConfigurationIdentifierList = (output, context) => {
1510
+ const retVal = (output || [])
1511
+ .filter((e) => e != null)
1512
+ .map((entry) => {
1513
+ if (entry === null) {
1514
+ return null;
1515
+ }
1516
+ return (0, smithy_client_1.expectString)(entry);
1517
+ });
1518
+ return retVal;
1519
+ };
1520
+ const deserializeAws_restJson1LoggingConfigurationList = (output, context) => {
1521
+ const retVal = (output || [])
1522
+ .filter((e) => e != null)
1523
+ .map((entry) => {
1524
+ if (entry === null) {
1525
+ return null;
1526
+ }
1527
+ return deserializeAws_restJson1LoggingConfigurationSummary(entry, context);
1528
+ });
1529
+ return retVal;
1530
+ };
1531
+ const deserializeAws_restJson1LoggingConfigurationSummary = (output, context) => {
1532
+ return {
1533
+ arn: (0, smithy_client_1.expectString)(output.arn),
1534
+ createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createTime)) : undefined,
1535
+ destinationConfiguration: output.destinationConfiguration != null
1536
+ ? deserializeAws_restJson1DestinationConfiguration((0, smithy_client_1.expectUnion)(output.destinationConfiguration), context)
1537
+ : undefined,
1538
+ id: (0, smithy_client_1.expectString)(output.id),
1539
+ name: (0, smithy_client_1.expectString)(output.name),
1540
+ state: (0, smithy_client_1.expectString)(output.state),
1541
+ tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
1542
+ updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updateTime)) : undefined,
1543
+ };
1544
+ };
1039
1545
  const deserializeAws_restJson1MessageReviewHandler = (output, context) => {
1040
1546
  return {
1041
1547
  fallbackResult: (0, smithy_client_1.expectString)(output.fallbackResult),
@@ -1058,6 +1564,9 @@ const deserializeAws_restJson1RoomSummary = (output, context) => {
1058
1564
  arn: (0, smithy_client_1.expectString)(output.arn),
1059
1565
  createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createTime)) : undefined,
1060
1566
  id: (0, smithy_client_1.expectString)(output.id),
1567
+ loggingConfigurationIdentifiers: output.loggingConfigurationIdentifiers != null
1568
+ ? deserializeAws_restJson1LoggingConfigurationIdentifierList(output.loggingConfigurationIdentifiers, context)
1569
+ : undefined,
1061
1570
  messageReviewHandler: output.messageReviewHandler != null
1062
1571
  ? deserializeAws_restJson1MessageReviewHandler(output.messageReviewHandler, context)
1063
1572
  : undefined,
@@ -1066,6 +1575,11 @@ const deserializeAws_restJson1RoomSummary = (output, context) => {
1066
1575
  updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updateTime)) : undefined,
1067
1576
  };
1068
1577
  };
1578
+ const deserializeAws_restJson1S3DestinationConfiguration = (output, context) => {
1579
+ return {
1580
+ bucketName: (0, smithy_client_1.expectString)(output.bucketName),
1581
+ };
1582
+ };
1069
1583
  const deserializeAws_restJson1Tags = (output, context) => {
1070
1584
  return Object.entries(output).reduce((acc, [key, value]) => {
1071
1585
  if (value === null) {