@aws-sdk/client-chime-sdk-identity 3.297.0 → 3.299.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 (90) hide show
  1. package/README.md +48 -0
  2. package/dist-cjs/ChimeSDKIdentity.js +90 -0
  3. package/dist-cjs/commands/CreateAppInstanceAdminCommand.js +1 -1
  4. package/dist-cjs/commands/CreateAppInstanceBotCommand.js +46 -0
  5. package/dist-cjs/commands/CreateAppInstanceCommand.js +1 -1
  6. package/dist-cjs/commands/CreateAppInstanceUserCommand.js +1 -1
  7. package/dist-cjs/commands/DeleteAppInstanceAdminCommand.js +2 -3
  8. package/dist-cjs/commands/DeleteAppInstanceBotCommand.js +45 -0
  9. package/dist-cjs/commands/DeleteAppInstanceCommand.js +2 -3
  10. package/dist-cjs/commands/DeleteAppInstanceUserCommand.js +2 -3
  11. package/dist-cjs/commands/DeregisterAppInstanceUserEndpointCommand.js +1 -1
  12. package/dist-cjs/commands/DescribeAppInstanceAdminCommand.js +1 -1
  13. package/dist-cjs/commands/DescribeAppInstanceBotCommand.js +46 -0
  14. package/dist-cjs/commands/DescribeAppInstanceCommand.js +1 -1
  15. package/dist-cjs/commands/DescribeAppInstanceUserCommand.js +1 -1
  16. package/dist-cjs/commands/GetAppInstanceRetentionSettingsCommand.js +2 -3
  17. package/dist-cjs/commands/ListAppInstanceBotsCommand.js +46 -0
  18. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -1
  19. package/dist-cjs/commands/PutAppInstanceRetentionSettingsCommand.js +2 -3
  20. package/dist-cjs/commands/PutAppInstanceUserExpirationSettingsCommand.js +45 -0
  21. package/dist-cjs/commands/TagResourceCommand.js +1 -1
  22. package/dist-cjs/commands/UntagResourceCommand.js +1 -1
  23. package/dist-cjs/commands/UpdateAppInstanceBotCommand.js +46 -0
  24. package/dist-cjs/commands/UpdateAppInstanceCommand.js +1 -1
  25. package/dist-cjs/commands/UpdateAppInstanceUserCommand.js +1 -1
  26. package/dist-cjs/commands/index.js +6 -0
  27. package/dist-cjs/endpoint/ruleset.js +3 -3
  28. package/dist-cjs/models/models_0.js +62 -77
  29. package/dist-cjs/pagination/ListAppInstanceBotsPaginator.js +29 -0
  30. package/dist-cjs/pagination/index.js +1 -0
  31. package/dist-cjs/protocols/Aws_restJson1.js +552 -1
  32. package/dist-es/ChimeSDKIdentity.js +90 -0
  33. package/dist-es/commands/CreateAppInstanceAdminCommand.js +2 -2
  34. package/dist-es/commands/CreateAppInstanceBotCommand.js +42 -0
  35. package/dist-es/commands/CreateAppInstanceCommand.js +2 -2
  36. package/dist-es/commands/CreateAppInstanceUserCommand.js +2 -2
  37. package/dist-es/commands/DeleteAppInstanceAdminCommand.js +2 -3
  38. package/dist-es/commands/DeleteAppInstanceBotCommand.js +41 -0
  39. package/dist-es/commands/DeleteAppInstanceCommand.js +2 -3
  40. package/dist-es/commands/DeleteAppInstanceUserCommand.js +2 -3
  41. package/dist-es/commands/DeregisterAppInstanceUserEndpointCommand.js +1 -1
  42. package/dist-es/commands/DescribeAppInstanceAdminCommand.js +2 -2
  43. package/dist-es/commands/DescribeAppInstanceBotCommand.js +42 -0
  44. package/dist-es/commands/DescribeAppInstanceCommand.js +2 -2
  45. package/dist-es/commands/DescribeAppInstanceUserCommand.js +2 -2
  46. package/dist-es/commands/GetAppInstanceRetentionSettingsCommand.js +2 -3
  47. package/dist-es/commands/ListAppInstanceBotsCommand.js +42 -0
  48. package/dist-es/commands/ListTagsForResourceCommand.js +2 -2
  49. package/dist-es/commands/PutAppInstanceRetentionSettingsCommand.js +2 -3
  50. package/dist-es/commands/PutAppInstanceUserExpirationSettingsCommand.js +41 -0
  51. package/dist-es/commands/TagResourceCommand.js +1 -1
  52. package/dist-es/commands/UntagResourceCommand.js +1 -1
  53. package/dist-es/commands/UpdateAppInstanceBotCommand.js +42 -0
  54. package/dist-es/commands/UpdateAppInstanceCommand.js +2 -2
  55. package/dist-es/commands/UpdateAppInstanceUserCommand.js +2 -2
  56. package/dist-es/commands/index.js +6 -0
  57. package/dist-es/endpoint/ruleset.js +3 -3
  58. package/dist-es/models/models_0.js +51 -55
  59. package/dist-es/pagination/ListAppInstanceBotsPaginator.js +25 -0
  60. package/dist-es/pagination/index.js +1 -0
  61. package/dist-es/protocols/Aws_restJson1.js +539 -1
  62. package/dist-types/ChimeSDKIdentity.d.ts +61 -6
  63. package/dist-types/ChimeSDKIdentityClient.d.ts +8 -2
  64. package/dist-types/commands/CreateAppInstanceAdminCommand.d.ts +4 -5
  65. package/dist-types/commands/CreateAppInstanceBotCommand.d.ts +86 -0
  66. package/dist-types/commands/DeleteAppInstanceAdminCommand.d.ts +2 -1
  67. package/dist-types/commands/DeleteAppInstanceBotCommand.d.ts +85 -0
  68. package/dist-types/commands/DescribeAppInstanceBotCommand.d.ts +81 -0
  69. package/dist-types/commands/ListAppInstanceBotsCommand.d.ts +81 -0
  70. package/dist-types/commands/PutAppInstanceUserExpirationSettingsCommand.d.ts +88 -0
  71. package/dist-types/commands/UpdateAppInstanceBotCommand.d.ts +85 -0
  72. package/dist-types/commands/index.d.ts +6 -0
  73. package/dist-types/models/models_0.d.ts +302 -66
  74. package/dist-types/pagination/ListAppInstanceBotsPaginator.d.ts +7 -0
  75. package/dist-types/pagination/index.d.ts +1 -0
  76. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  77. package/dist-types/ts3.4/ChimeSDKIdentity.d.ts +108 -0
  78. package/dist-types/ts3.4/ChimeSDKIdentityClient.d.ts +36 -0
  79. package/dist-types/ts3.4/commands/CreateAppInstanceBotCommand.d.ts +41 -0
  80. package/dist-types/ts3.4/commands/DeleteAppInstanceBotCommand.d.ts +36 -0
  81. package/dist-types/ts3.4/commands/DescribeAppInstanceBotCommand.d.ts +41 -0
  82. package/dist-types/ts3.4/commands/ListAppInstanceBotsCommand.d.ts +38 -0
  83. package/dist-types/ts3.4/commands/PutAppInstanceUserExpirationSettingsCommand.d.ts +41 -0
  84. package/dist-types/ts3.4/commands/UpdateAppInstanceBotCommand.d.ts +41 -0
  85. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  86. package/dist-types/ts3.4/models/models_0.d.ts +106 -55
  87. package/dist-types/ts3.4/pagination/ListAppInstanceBotsPaginator.d.ts +11 -0
  88. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  89. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +72 -0
  90. package/package.json +11 -10
@@ -2,7 +2,7 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
2
  import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ChimeSDKIdentityServiceException as __BaseException } from "../models/ChimeSDKIdentityServiceException";
5
- import { BadRequestException, ConflictException, ForbiddenException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, } from "../models/models_0";
5
+ import { BadRequestException, ConflictException, ForbiddenException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, } from "../models/models_0";
6
6
  export const serializeAws_restJson1CreateAppInstanceCommand = async (input, context) => {
7
7
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
8
  const headers = {
@@ -47,6 +47,33 @@ export const serializeAws_restJson1CreateAppInstanceAdminCommand = async (input,
47
47
  body,
48
48
  });
49
49
  };
50
+ export const serializeAws_restJson1CreateAppInstanceBotCommand = async (input, context) => {
51
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
+ const headers = {
53
+ "content-type": "application/json",
54
+ };
55
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots";
56
+ let body;
57
+ body = JSON.stringify({
58
+ ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
59
+ ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
60
+ ...(input.Configuration != null && {
61
+ Configuration: serializeAws_restJson1Configuration(input.Configuration, context),
62
+ }),
63
+ ...(input.Metadata != null && { Metadata: input.Metadata }),
64
+ ...(input.Name != null && { Name: input.Name }),
65
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
66
+ });
67
+ return new __HttpRequest({
68
+ protocol,
69
+ hostname,
70
+ port,
71
+ method: "POST",
72
+ headers,
73
+ path: resolvedPath,
74
+ body,
75
+ });
76
+ };
50
77
  export const serializeAws_restJson1CreateAppInstanceUserCommand = async (input, context) => {
51
78
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
79
  const headers = {
@@ -58,6 +85,9 @@ export const serializeAws_restJson1CreateAppInstanceUserCommand = async (input,
58
85
  ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
59
86
  ...(input.AppInstanceUserId != null && { AppInstanceUserId: input.AppInstanceUserId }),
60
87
  ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
88
+ ...(input.ExpirationSettings != null && {
89
+ ExpirationSettings: serializeAws_restJson1ExpirationSettings(input.ExpirationSettings, context),
90
+ }),
61
91
  ...(input.Metadata != null && { Metadata: input.Metadata }),
62
92
  ...(input.Name != null && { Name: input.Name }),
63
93
  ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
@@ -106,6 +136,22 @@ export const serializeAws_restJson1DeleteAppInstanceAdminCommand = async (input,
106
136
  body,
107
137
  });
108
138
  };
139
+ export const serializeAws_restJson1DeleteAppInstanceBotCommand = async (input, context) => {
140
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const headers = {};
142
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots/{AppInstanceBotArn}";
143
+ resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
144
+ let body;
145
+ return new __HttpRequest({
146
+ protocol,
147
+ hostname,
148
+ port,
149
+ method: "DELETE",
150
+ headers,
151
+ path: resolvedPath,
152
+ body,
153
+ });
154
+ };
109
155
  export const serializeAws_restJson1DeleteAppInstanceUserCommand = async (input, context) => {
110
156
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
111
157
  const headers = {};
@@ -174,6 +220,22 @@ export const serializeAws_restJson1DescribeAppInstanceAdminCommand = async (inpu
174
220
  body,
175
221
  });
176
222
  };
223
+ export const serializeAws_restJson1DescribeAppInstanceBotCommand = async (input, context) => {
224
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
+ const headers = {};
226
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots/{AppInstanceBotArn}";
227
+ resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
228
+ let body;
229
+ return new __HttpRequest({
230
+ protocol,
231
+ hostname,
232
+ port,
233
+ method: "GET",
234
+ headers,
235
+ path: resolvedPath,
236
+ body,
237
+ });
238
+ };
177
239
  export const serializeAws_restJson1DescribeAppInstanceUserCommand = async (input, context) => {
178
240
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
179
241
  const headers = {};
@@ -246,6 +308,27 @@ export const serializeAws_restJson1ListAppInstanceAdminsCommand = async (input,
246
308
  body,
247
309
  });
248
310
  };
311
+ export const serializeAws_restJson1ListAppInstanceBotsCommand = async (input, context) => {
312
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
313
+ const headers = {};
314
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots";
315
+ const query = map({
316
+ "app-instance-arn": [, __expectNonNull(input.AppInstanceArn, `AppInstanceArn`)],
317
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
318
+ "next-token": [, input.NextToken],
319
+ });
320
+ let body;
321
+ return new __HttpRequest({
322
+ protocol,
323
+ hostname,
324
+ port,
325
+ method: "GET",
326
+ headers,
327
+ path: resolvedPath,
328
+ query,
329
+ body,
330
+ });
331
+ };
249
332
  export const serializeAws_restJson1ListAppInstancesCommand = async (input, context) => {
250
333
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
334
  const headers = {};
@@ -352,6 +435,30 @@ export const serializeAws_restJson1PutAppInstanceRetentionSettingsCommand = asyn
352
435
  body,
353
436
  });
354
437
  };
438
+ export const serializeAws_restJson1PutAppInstanceUserExpirationSettingsCommand = async (input, context) => {
439
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
440
+ const headers = {
441
+ "content-type": "application/json",
442
+ };
443
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
444
+ "/app-instance-users/{AppInstanceUserArn}/expiration-settings";
445
+ resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
446
+ let body;
447
+ body = JSON.stringify({
448
+ ...(input.ExpirationSettings != null && {
449
+ ExpirationSettings: serializeAws_restJson1ExpirationSettings(input.ExpirationSettings, context),
450
+ }),
451
+ });
452
+ return new __HttpRequest({
453
+ protocol,
454
+ hostname,
455
+ port,
456
+ method: "PUT",
457
+ headers,
458
+ path: resolvedPath,
459
+ body,
460
+ });
461
+ };
355
462
  export const serializeAws_restJson1RegisterAppInstanceUserEndpointCommand = async (input, context) => {
356
463
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
357
464
  const headers = {
@@ -453,6 +560,28 @@ export const serializeAws_restJson1UpdateAppInstanceCommand = async (input, cont
453
560
  body,
454
561
  });
455
562
  };
563
+ export const serializeAws_restJson1UpdateAppInstanceBotCommand = async (input, context) => {
564
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
565
+ const headers = {
566
+ "content-type": "application/json",
567
+ };
568
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots/{AppInstanceBotArn}";
569
+ resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
570
+ let body;
571
+ body = JSON.stringify({
572
+ ...(input.Metadata != null && { Metadata: input.Metadata }),
573
+ ...(input.Name != null && { Name: input.Name }),
574
+ });
575
+ return new __HttpRequest({
576
+ protocol,
577
+ hostname,
578
+ port,
579
+ method: "PUT",
580
+ headers,
581
+ path: resolvedPath,
582
+ body,
583
+ });
584
+ };
456
585
  export const serializeAws_restJson1UpdateAppInstanceUserCommand = async (input, context) => {
457
586
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
458
587
  const headers = {
@@ -610,6 +739,60 @@ const deserializeAws_restJson1CreateAppInstanceAdminCommandError = async (output
610
739
  });
611
740
  }
612
741
  };
742
+ export const deserializeAws_restJson1CreateAppInstanceBotCommand = async (output, context) => {
743
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
744
+ return deserializeAws_restJson1CreateAppInstanceBotCommandError(output, context);
745
+ }
746
+ const contents = map({
747
+ $metadata: deserializeMetadata(output),
748
+ });
749
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
750
+ if (data.AppInstanceBotArn != null) {
751
+ contents.AppInstanceBotArn = __expectString(data.AppInstanceBotArn);
752
+ }
753
+ return contents;
754
+ };
755
+ const deserializeAws_restJson1CreateAppInstanceBotCommandError = async (output, context) => {
756
+ const parsedOutput = {
757
+ ...output,
758
+ body: await parseErrorBody(output.body, context),
759
+ };
760
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
+ switch (errorCode) {
762
+ case "BadRequestException":
763
+ case "com.amazonaws.chimesdkidentity#BadRequestException":
764
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
765
+ case "ConflictException":
766
+ case "com.amazonaws.chimesdkidentity#ConflictException":
767
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
768
+ case "ForbiddenException":
769
+ case "com.amazonaws.chimesdkidentity#ForbiddenException":
770
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
771
+ case "ResourceLimitExceededException":
772
+ case "com.amazonaws.chimesdkidentity#ResourceLimitExceededException":
773
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
774
+ case "ServiceFailureException":
775
+ case "com.amazonaws.chimesdkidentity#ServiceFailureException":
776
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
777
+ case "ServiceUnavailableException":
778
+ case "com.amazonaws.chimesdkidentity#ServiceUnavailableException":
779
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
780
+ case "ThrottledClientException":
781
+ case "com.amazonaws.chimesdkidentity#ThrottledClientException":
782
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
783
+ case "UnauthorizedClientException":
784
+ case "com.amazonaws.chimesdkidentity#UnauthorizedClientException":
785
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
786
+ default:
787
+ const parsedBody = parsedOutput.body;
788
+ throwDefaultError({
789
+ output,
790
+ parsedBody,
791
+ exceptionCtor: __BaseException,
792
+ errorCode,
793
+ });
794
+ }
795
+ };
613
796
  export const deserializeAws_restJson1CreateAppInstanceUserCommand = async (output, context) => {
614
797
  if (output.statusCode !== 201 && output.statusCode >= 300) {
615
798
  return deserializeAws_restJson1CreateAppInstanceUserCommandError(output, context);
@@ -763,6 +946,57 @@ const deserializeAws_restJson1DeleteAppInstanceAdminCommandError = async (output
763
946
  });
764
947
  }
765
948
  };
949
+ export const deserializeAws_restJson1DeleteAppInstanceBotCommand = async (output, context) => {
950
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
951
+ return deserializeAws_restJson1DeleteAppInstanceBotCommandError(output, context);
952
+ }
953
+ const contents = map({
954
+ $metadata: deserializeMetadata(output),
955
+ });
956
+ await collectBody(output.body, context);
957
+ return contents;
958
+ };
959
+ const deserializeAws_restJson1DeleteAppInstanceBotCommandError = async (output, context) => {
960
+ const parsedOutput = {
961
+ ...output,
962
+ body: await parseErrorBody(output.body, context),
963
+ };
964
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
965
+ switch (errorCode) {
966
+ case "BadRequestException":
967
+ case "com.amazonaws.chimesdkidentity#BadRequestException":
968
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
969
+ case "ConflictException":
970
+ case "com.amazonaws.chimesdkidentity#ConflictException":
971
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
972
+ case "ForbiddenException":
973
+ case "com.amazonaws.chimesdkidentity#ForbiddenException":
974
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
975
+ case "ResourceLimitExceededException":
976
+ case "com.amazonaws.chimesdkidentity#ResourceLimitExceededException":
977
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
978
+ case "ServiceFailureException":
979
+ case "com.amazonaws.chimesdkidentity#ServiceFailureException":
980
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
981
+ case "ServiceUnavailableException":
982
+ case "com.amazonaws.chimesdkidentity#ServiceUnavailableException":
983
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
984
+ case "ThrottledClientException":
985
+ case "com.amazonaws.chimesdkidentity#ThrottledClientException":
986
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
987
+ case "UnauthorizedClientException":
988
+ case "com.amazonaws.chimesdkidentity#UnauthorizedClientException":
989
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
990
+ default:
991
+ const parsedBody = parsedOutput.body;
992
+ throwDefaultError({
993
+ output,
994
+ parsedBody,
995
+ exceptionCtor: __BaseException,
996
+ errorCode,
997
+ });
998
+ }
999
+ };
766
1000
  export const deserializeAws_restJson1DeleteAppInstanceUserCommand = async (output, context) => {
767
1001
  if (output.statusCode !== 204 && output.statusCode >= 300) {
768
1002
  return deserializeAws_restJson1DeleteAppInstanceUserCommandError(output, context);
@@ -955,6 +1189,57 @@ const deserializeAws_restJson1DescribeAppInstanceAdminCommandError = async (outp
955
1189
  });
956
1190
  }
957
1191
  };
1192
+ export const deserializeAws_restJson1DescribeAppInstanceBotCommand = async (output, context) => {
1193
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1194
+ return deserializeAws_restJson1DescribeAppInstanceBotCommandError(output, context);
1195
+ }
1196
+ const contents = map({
1197
+ $metadata: deserializeMetadata(output),
1198
+ });
1199
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1200
+ if (data.AppInstanceBot != null) {
1201
+ contents.AppInstanceBot = deserializeAws_restJson1AppInstanceBot(data.AppInstanceBot, context);
1202
+ }
1203
+ return contents;
1204
+ };
1205
+ const deserializeAws_restJson1DescribeAppInstanceBotCommandError = async (output, context) => {
1206
+ const parsedOutput = {
1207
+ ...output,
1208
+ body: await parseErrorBody(output.body, context),
1209
+ };
1210
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1211
+ switch (errorCode) {
1212
+ case "BadRequestException":
1213
+ case "com.amazonaws.chimesdkidentity#BadRequestException":
1214
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1215
+ case "ForbiddenException":
1216
+ case "com.amazonaws.chimesdkidentity#ForbiddenException":
1217
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1218
+ case "NotFoundException":
1219
+ case "com.amazonaws.chimesdkidentity#NotFoundException":
1220
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1221
+ case "ServiceFailureException":
1222
+ case "com.amazonaws.chimesdkidentity#ServiceFailureException":
1223
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
1224
+ case "ServiceUnavailableException":
1225
+ case "com.amazonaws.chimesdkidentity#ServiceUnavailableException":
1226
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1227
+ case "ThrottledClientException":
1228
+ case "com.amazonaws.chimesdkidentity#ThrottledClientException":
1229
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
1230
+ case "UnauthorizedClientException":
1231
+ case "com.amazonaws.chimesdkidentity#UnauthorizedClientException":
1232
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
1233
+ default:
1234
+ const parsedBody = parsedOutput.body;
1235
+ throwDefaultError({
1236
+ output,
1237
+ parsedBody,
1238
+ exceptionCtor: __BaseException,
1239
+ errorCode,
1240
+ });
1241
+ }
1242
+ };
958
1243
  export const deserializeAws_restJson1DescribeAppInstanceUserCommand = async (output, context) => {
959
1244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
960
1245
  return deserializeAws_restJson1DescribeAppInstanceUserCommandError(output, context);
@@ -1159,6 +1444,63 @@ const deserializeAws_restJson1ListAppInstanceAdminsCommandError = async (output,
1159
1444
  });
1160
1445
  }
1161
1446
  };
1447
+ export const deserializeAws_restJson1ListAppInstanceBotsCommand = async (output, context) => {
1448
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1449
+ return deserializeAws_restJson1ListAppInstanceBotsCommandError(output, context);
1450
+ }
1451
+ const contents = map({
1452
+ $metadata: deserializeMetadata(output),
1453
+ });
1454
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1455
+ if (data.AppInstanceArn != null) {
1456
+ contents.AppInstanceArn = __expectString(data.AppInstanceArn);
1457
+ }
1458
+ if (data.AppInstanceBots != null) {
1459
+ contents.AppInstanceBots = deserializeAws_restJson1AppInstanceBotList(data.AppInstanceBots, context);
1460
+ }
1461
+ if (data.NextToken != null) {
1462
+ contents.NextToken = __expectString(data.NextToken);
1463
+ }
1464
+ return contents;
1465
+ };
1466
+ const deserializeAws_restJson1ListAppInstanceBotsCommandError = async (output, context) => {
1467
+ const parsedOutput = {
1468
+ ...output,
1469
+ body: await parseErrorBody(output.body, context),
1470
+ };
1471
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1472
+ switch (errorCode) {
1473
+ case "BadRequestException":
1474
+ case "com.amazonaws.chimesdkidentity#BadRequestException":
1475
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1476
+ case "ForbiddenException":
1477
+ case "com.amazonaws.chimesdkidentity#ForbiddenException":
1478
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1479
+ case "ResourceLimitExceededException":
1480
+ case "com.amazonaws.chimesdkidentity#ResourceLimitExceededException":
1481
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
1482
+ case "ServiceFailureException":
1483
+ case "com.amazonaws.chimesdkidentity#ServiceFailureException":
1484
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
1485
+ case "ServiceUnavailableException":
1486
+ case "com.amazonaws.chimesdkidentity#ServiceUnavailableException":
1487
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1488
+ case "ThrottledClientException":
1489
+ case "com.amazonaws.chimesdkidentity#ThrottledClientException":
1490
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
1491
+ case "UnauthorizedClientException":
1492
+ case "com.amazonaws.chimesdkidentity#UnauthorizedClientException":
1493
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
1494
+ default:
1495
+ const parsedBody = parsedOutput.body;
1496
+ throwDefaultError({
1497
+ output,
1498
+ parsedBody,
1499
+ exceptionCtor: __BaseException,
1500
+ errorCode,
1501
+ });
1502
+ }
1503
+ };
1162
1504
  export const deserializeAws_restJson1ListAppInstancesCommand = async (output, context) => {
1163
1505
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1164
1506
  return deserializeAws_restJson1ListAppInstancesCommandError(output, context);
@@ -1414,6 +1756,60 @@ const deserializeAws_restJson1PutAppInstanceRetentionSettingsCommandError = asyn
1414
1756
  });
1415
1757
  }
1416
1758
  };
1759
+ export const deserializeAws_restJson1PutAppInstanceUserExpirationSettingsCommand = async (output, context) => {
1760
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1761
+ return deserializeAws_restJson1PutAppInstanceUserExpirationSettingsCommandError(output, context);
1762
+ }
1763
+ const contents = map({
1764
+ $metadata: deserializeMetadata(output),
1765
+ });
1766
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1767
+ if (data.AppInstanceUserArn != null) {
1768
+ contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn);
1769
+ }
1770
+ if (data.ExpirationSettings != null) {
1771
+ contents.ExpirationSettings = deserializeAws_restJson1ExpirationSettings(data.ExpirationSettings, context);
1772
+ }
1773
+ return contents;
1774
+ };
1775
+ const deserializeAws_restJson1PutAppInstanceUserExpirationSettingsCommandError = async (output, context) => {
1776
+ const parsedOutput = {
1777
+ ...output,
1778
+ body: await parseErrorBody(output.body, context),
1779
+ };
1780
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1781
+ switch (errorCode) {
1782
+ case "BadRequestException":
1783
+ case "com.amazonaws.chimesdkidentity#BadRequestException":
1784
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1785
+ case "ConflictException":
1786
+ case "com.amazonaws.chimesdkidentity#ConflictException":
1787
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1788
+ case "ForbiddenException":
1789
+ case "com.amazonaws.chimesdkidentity#ForbiddenException":
1790
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1791
+ case "ServiceFailureException":
1792
+ case "com.amazonaws.chimesdkidentity#ServiceFailureException":
1793
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
1794
+ case "ServiceUnavailableException":
1795
+ case "com.amazonaws.chimesdkidentity#ServiceUnavailableException":
1796
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1797
+ case "ThrottledClientException":
1798
+ case "com.amazonaws.chimesdkidentity#ThrottledClientException":
1799
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
1800
+ case "UnauthorizedClientException":
1801
+ case "com.amazonaws.chimesdkidentity#UnauthorizedClientException":
1802
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
1803
+ default:
1804
+ const parsedBody = parsedOutput.body;
1805
+ throwDefaultError({
1806
+ output,
1807
+ parsedBody,
1808
+ exceptionCtor: __BaseException,
1809
+ errorCode,
1810
+ });
1811
+ }
1812
+ };
1417
1813
  export const deserializeAws_restJson1RegisterAppInstanceUserEndpointCommand = async (output, context) => {
1418
1814
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1419
1815
  return deserializeAws_restJson1RegisterAppInstanceUserEndpointCommandError(output, context);
@@ -1615,6 +2011,60 @@ const deserializeAws_restJson1UpdateAppInstanceCommandError = async (output, con
1615
2011
  });
1616
2012
  }
1617
2013
  };
2014
+ export const deserializeAws_restJson1UpdateAppInstanceBotCommand = async (output, context) => {
2015
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2016
+ return deserializeAws_restJson1UpdateAppInstanceBotCommandError(output, context);
2017
+ }
2018
+ const contents = map({
2019
+ $metadata: deserializeMetadata(output),
2020
+ });
2021
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2022
+ if (data.AppInstanceBotArn != null) {
2023
+ contents.AppInstanceBotArn = __expectString(data.AppInstanceBotArn);
2024
+ }
2025
+ return contents;
2026
+ };
2027
+ const deserializeAws_restJson1UpdateAppInstanceBotCommandError = async (output, context) => {
2028
+ const parsedOutput = {
2029
+ ...output,
2030
+ body: await parseErrorBody(output.body, context),
2031
+ };
2032
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2033
+ switch (errorCode) {
2034
+ case "BadRequestException":
2035
+ case "com.amazonaws.chimesdkidentity#BadRequestException":
2036
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2037
+ case "ConflictException":
2038
+ case "com.amazonaws.chimesdkidentity#ConflictException":
2039
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2040
+ case "ForbiddenException":
2041
+ case "com.amazonaws.chimesdkidentity#ForbiddenException":
2042
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2043
+ case "ResourceLimitExceededException":
2044
+ case "com.amazonaws.chimesdkidentity#ResourceLimitExceededException":
2045
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
2046
+ case "ServiceFailureException":
2047
+ case "com.amazonaws.chimesdkidentity#ServiceFailureException":
2048
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
2049
+ case "ServiceUnavailableException":
2050
+ case "com.amazonaws.chimesdkidentity#ServiceUnavailableException":
2051
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
2052
+ case "ThrottledClientException":
2053
+ case "com.amazonaws.chimesdkidentity#ThrottledClientException":
2054
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
2055
+ case "UnauthorizedClientException":
2056
+ case "com.amazonaws.chimesdkidentity#UnauthorizedClientException":
2057
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
2058
+ default:
2059
+ const parsedBody = parsedOutput.body;
2060
+ throwDefaultError({
2061
+ output,
2062
+ parsedBody,
2063
+ exceptionCtor: __BaseException,
2064
+ errorCode,
2065
+ });
2066
+ }
2067
+ };
1618
2068
  export const deserializeAws_restJson1UpdateAppInstanceUserCommand = async (output, context) => {
1619
2069
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1620
2070
  return deserializeAws_restJson1UpdateAppInstanceUserCommandError(output, context);
@@ -1769,6 +2219,21 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
1769
2219
  });
1770
2220
  return __decorateServiceException(exception, parsedOutput.body);
1771
2221
  };
2222
+ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
2223
+ const contents = map({});
2224
+ const data = parsedOutput.body;
2225
+ if (data.Code != null) {
2226
+ contents.Code = __expectString(data.Code);
2227
+ }
2228
+ if (data.Message != null) {
2229
+ contents.Message = __expectString(data.Message);
2230
+ }
2231
+ const exception = new NotFoundException({
2232
+ $metadata: deserializeMetadata(parsedOutput),
2233
+ ...contents,
2234
+ });
2235
+ return __decorateServiceException(exception, parsedOutput.body);
2236
+ };
1772
2237
  const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (parsedOutput, context) => {
1773
2238
  const contents = map({});
1774
2239
  const data = parsedOutput.body;
@@ -1856,12 +2321,31 @@ const serializeAws_restJson1ChannelRetentionSettings = (input, context) => {
1856
2321
  ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }),
1857
2322
  };
1858
2323
  };
2324
+ const serializeAws_restJson1Configuration = (input, context) => {
2325
+ return {
2326
+ ...(input.Lex != null && { Lex: serializeAws_restJson1LexConfiguration(input.Lex, context) }),
2327
+ };
2328
+ };
1859
2329
  const serializeAws_restJson1EndpointAttributes = (input, context) => {
1860
2330
  return {
1861
2331
  ...(input.DeviceToken != null && { DeviceToken: input.DeviceToken }),
1862
2332
  ...(input.VoipDeviceToken != null && { VoipDeviceToken: input.VoipDeviceToken }),
1863
2333
  };
1864
2334
  };
2335
+ const serializeAws_restJson1ExpirationSettings = (input, context) => {
2336
+ return {
2337
+ ...(input.ExpirationCriterion != null && { ExpirationCriterion: input.ExpirationCriterion }),
2338
+ ...(input.ExpirationDays != null && { ExpirationDays: input.ExpirationDays }),
2339
+ };
2340
+ };
2341
+ const serializeAws_restJson1LexConfiguration = (input, context) => {
2342
+ return {
2343
+ ...(input.LexBotAliasArn != null && { LexBotAliasArn: input.LexBotAliasArn }),
2344
+ ...(input.LocaleId != null && { LocaleId: input.LocaleId }),
2345
+ ...(input.RespondsTo != null && { RespondsTo: input.RespondsTo }),
2346
+ ...(input.WelcomeIntent != null && { WelcomeIntent: input.WelcomeIntent }),
2347
+ };
2348
+ };
1865
2349
  const serializeAws_restJson1Tag = (input, context) => {
1866
2350
  return {
1867
2351
  ...(input.Key != null && { Key: input.Key }),
@@ -1920,6 +2404,38 @@ const deserializeAws_restJson1AppInstanceAdminSummary = (output, context) => {
1920
2404
  Admin: output.Admin != null ? deserializeAws_restJson1Identity(output.Admin, context) : undefined,
1921
2405
  };
1922
2406
  };
2407
+ const deserializeAws_restJson1AppInstanceBot = (output, context) => {
2408
+ return {
2409
+ AppInstanceBotArn: __expectString(output.AppInstanceBotArn),
2410
+ Configuration: output.Configuration != null ? deserializeAws_restJson1Configuration(output.Configuration, context) : undefined,
2411
+ CreatedTimestamp: output.CreatedTimestamp != null
2412
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
2413
+ : undefined,
2414
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
2415
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp)))
2416
+ : undefined,
2417
+ Metadata: __expectString(output.Metadata),
2418
+ Name: __expectString(output.Name),
2419
+ };
2420
+ };
2421
+ const deserializeAws_restJson1AppInstanceBotList = (output, context) => {
2422
+ const retVal = (output || [])
2423
+ .filter((e) => e != null)
2424
+ .map((entry) => {
2425
+ if (entry === null) {
2426
+ return null;
2427
+ }
2428
+ return deserializeAws_restJson1AppInstanceBotSummary(entry, context);
2429
+ });
2430
+ return retVal;
2431
+ };
2432
+ const deserializeAws_restJson1AppInstanceBotSummary = (output, context) => {
2433
+ return {
2434
+ AppInstanceBotArn: __expectString(output.AppInstanceBotArn),
2435
+ Metadata: __expectString(output.Metadata),
2436
+ Name: __expectString(output.Name),
2437
+ };
2438
+ };
1923
2439
  const deserializeAws_restJson1AppInstanceList = (output, context) => {
1924
2440
  const retVal = (output || [])
1925
2441
  .filter((e) => e != null)
@@ -1951,6 +2467,9 @@ const deserializeAws_restJson1AppInstanceUser = (output, context) => {
1951
2467
  CreatedTimestamp: output.CreatedTimestamp != null
1952
2468
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
1953
2469
  : undefined,
2470
+ ExpirationSettings: output.ExpirationSettings != null
2471
+ ? deserializeAws_restJson1ExpirationSettings(output.ExpirationSettings, context)
2472
+ : undefined,
1954
2473
  LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
1955
2474
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp)))
1956
2475
  : undefined,
@@ -2022,6 +2541,11 @@ const deserializeAws_restJson1ChannelRetentionSettings = (output, context) => {
2022
2541
  RetentionDays: __expectInt32(output.RetentionDays),
2023
2542
  };
2024
2543
  };
2544
+ const deserializeAws_restJson1Configuration = (output, context) => {
2545
+ return {
2546
+ Lex: output.Lex != null ? deserializeAws_restJson1LexConfiguration(output.Lex, context) : undefined,
2547
+ };
2548
+ };
2025
2549
  const deserializeAws_restJson1EndpointAttributes = (output, context) => {
2026
2550
  return {
2027
2551
  DeviceToken: __expectString(output.DeviceToken),
@@ -2034,12 +2558,26 @@ const deserializeAws_restJson1EndpointState = (output, context) => {
2034
2558
  StatusReason: __expectString(output.StatusReason),
2035
2559
  };
2036
2560
  };
2561
+ const deserializeAws_restJson1ExpirationSettings = (output, context) => {
2562
+ return {
2563
+ ExpirationCriterion: __expectString(output.ExpirationCriterion),
2564
+ ExpirationDays: __expectInt32(output.ExpirationDays),
2565
+ };
2566
+ };
2037
2567
  const deserializeAws_restJson1Identity = (output, context) => {
2038
2568
  return {
2039
2569
  Arn: __expectString(output.Arn),
2040
2570
  Name: __expectString(output.Name),
2041
2571
  };
2042
2572
  };
2573
+ const deserializeAws_restJson1LexConfiguration = (output, context) => {
2574
+ return {
2575
+ LexBotAliasArn: __expectString(output.LexBotAliasArn),
2576
+ LocaleId: __expectString(output.LocaleId),
2577
+ RespondsTo: __expectString(output.RespondsTo),
2578
+ WelcomeIntent: __expectString(output.WelcomeIntent),
2579
+ };
2580
+ };
2043
2581
  const deserializeAws_restJson1Tag = (output, context) => {
2044
2582
  return {
2045
2583
  Key: __expectString(output.Key),