@aws-sdk/client-chime-sdk-identity 3.118.0 → 3.127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +164 -160
- package/dist-es/protocols/Aws_restJson1.js +148 -144
- package/package.json +26 -26
|
@@ -16,10 +16,9 @@ const serializeAws_restJson1CreateAppInstanceCommand = async (input, context) =>
|
|
|
16
16
|
let body;
|
|
17
17
|
body = JSON.stringify({
|
|
18
18
|
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
19
|
-
...(input.Metadata
|
|
20
|
-
...(input.Name
|
|
21
|
-
...(input.Tags
|
|
22
|
-
input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
|
|
19
|
+
...(input.Metadata != null && { Metadata: input.Metadata }),
|
|
20
|
+
...(input.Name != null && { Name: input.Name }),
|
|
21
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
|
|
23
22
|
});
|
|
24
23
|
return new protocol_http_1.HttpRequest({
|
|
25
24
|
protocol,
|
|
@@ -50,8 +49,7 @@ const serializeAws_restJson1CreateAppInstanceAdminCommand = async (input, contex
|
|
|
50
49
|
}
|
|
51
50
|
let body;
|
|
52
51
|
body = JSON.stringify({
|
|
53
|
-
...(input.AppInstanceAdminArn
|
|
54
|
-
input.AppInstanceAdminArn !== null && { AppInstanceAdminArn: input.AppInstanceAdminArn }),
|
|
52
|
+
...(input.AppInstanceAdminArn != null && { AppInstanceAdminArn: input.AppInstanceAdminArn }),
|
|
55
53
|
});
|
|
56
54
|
return new protocol_http_1.HttpRequest({
|
|
57
55
|
protocol,
|
|
@@ -73,15 +71,12 @@ const serializeAws_restJson1CreateAppInstanceUserCommand = async (input, context
|
|
|
73
71
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users";
|
|
74
72
|
let body;
|
|
75
73
|
body = JSON.stringify({
|
|
76
|
-
...(input.AppInstanceArn
|
|
77
|
-
|
|
78
|
-
...(input.AppInstanceUserId !== undefined &&
|
|
79
|
-
input.AppInstanceUserId !== null && { AppInstanceUserId: input.AppInstanceUserId }),
|
|
74
|
+
...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
|
|
75
|
+
...(input.AppInstanceUserId != null && { AppInstanceUserId: input.AppInstanceUserId }),
|
|
80
76
|
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
81
|
-
...(input.Metadata
|
|
82
|
-
...(input.Name
|
|
83
|
-
...(input.Tags
|
|
84
|
-
input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
|
|
77
|
+
...(input.Metadata != null && { Metadata: input.Metadata }),
|
|
78
|
+
...(input.Name != null && { Name: input.Name }),
|
|
79
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
|
|
85
80
|
});
|
|
86
81
|
return new protocol_http_1.HttpRequest({
|
|
87
82
|
protocol,
|
|
@@ -518,8 +513,7 @@ const serializeAws_restJson1PutAppInstanceRetentionSettingsCommand = async (inpu
|
|
|
518
513
|
}
|
|
519
514
|
let body;
|
|
520
515
|
body = JSON.stringify({
|
|
521
|
-
...(input.AppInstanceRetentionSettings
|
|
522
|
-
input.AppInstanceRetentionSettings !== null && {
|
|
516
|
+
...(input.AppInstanceRetentionSettings != null && {
|
|
523
517
|
AppInstanceRetentionSettings: serializeAws_restJson1AppInstanceRetentionSettings(input.AppInstanceRetentionSettings, context),
|
|
524
518
|
}),
|
|
525
519
|
});
|
|
@@ -554,15 +548,14 @@ const serializeAws_restJson1RegisterAppInstanceUserEndpointCommand = async (inpu
|
|
|
554
548
|
}
|
|
555
549
|
let body;
|
|
556
550
|
body = JSON.stringify({
|
|
557
|
-
...(input.AllowMessages
|
|
551
|
+
...(input.AllowMessages != null && { AllowMessages: input.AllowMessages }),
|
|
558
552
|
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
559
|
-
...(input.EndpointAttributes
|
|
560
|
-
input.EndpointAttributes !== null && {
|
|
553
|
+
...(input.EndpointAttributes != null && {
|
|
561
554
|
EndpointAttributes: serializeAws_restJson1EndpointAttributes(input.EndpointAttributes, context),
|
|
562
555
|
}),
|
|
563
|
-
...(input.Name
|
|
564
|
-
...(input.ResourceArn
|
|
565
|
-
...(input.Type
|
|
556
|
+
...(input.Name != null && { Name: input.Name }),
|
|
557
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
558
|
+
...(input.Type != null && { Type: input.Type }),
|
|
566
559
|
});
|
|
567
560
|
return new protocol_http_1.HttpRequest({
|
|
568
561
|
protocol,
|
|
@@ -586,9 +579,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
586
579
|
};
|
|
587
580
|
let body;
|
|
588
581
|
body = JSON.stringify({
|
|
589
|
-
...(input.ResourceARN
|
|
590
|
-
...(input.Tags
|
|
591
|
-
input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
|
|
582
|
+
...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
|
|
583
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
|
|
592
584
|
});
|
|
593
585
|
return new protocol_http_1.HttpRequest({
|
|
594
586
|
protocol,
|
|
@@ -613,9 +605,8 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
613
605
|
};
|
|
614
606
|
let body;
|
|
615
607
|
body = JSON.stringify({
|
|
616
|
-
...(input.ResourceARN
|
|
617
|
-
...(input.TagKeys
|
|
618
|
-
input.TagKeys !== null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
|
|
608
|
+
...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
|
|
609
|
+
...(input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
|
|
619
610
|
});
|
|
620
611
|
return new protocol_http_1.HttpRequest({
|
|
621
612
|
protocol,
|
|
@@ -647,8 +638,8 @@ const serializeAws_restJson1UpdateAppInstanceCommand = async (input, context) =>
|
|
|
647
638
|
}
|
|
648
639
|
let body;
|
|
649
640
|
body = JSON.stringify({
|
|
650
|
-
...(input.Metadata
|
|
651
|
-
...(input.Name
|
|
641
|
+
...(input.Metadata != null && { Metadata: input.Metadata }),
|
|
642
|
+
...(input.Name != null && { Name: input.Name }),
|
|
652
643
|
});
|
|
653
644
|
return new protocol_http_1.HttpRequest({
|
|
654
645
|
protocol,
|
|
@@ -679,8 +670,8 @@ const serializeAws_restJson1UpdateAppInstanceUserCommand = async (input, context
|
|
|
679
670
|
}
|
|
680
671
|
let body;
|
|
681
672
|
body = JSON.stringify({
|
|
682
|
-
...(input.Metadata
|
|
683
|
-
...(input.Name
|
|
673
|
+
...(input.Metadata != null && { Metadata: input.Metadata }),
|
|
674
|
+
...(input.Name != null && { Name: input.Name }),
|
|
684
675
|
});
|
|
685
676
|
return new protocol_http_1.HttpRequest({
|
|
686
677
|
protocol,
|
|
@@ -722,8 +713,8 @@ const serializeAws_restJson1UpdateAppInstanceUserEndpointCommand = async (input,
|
|
|
722
713
|
}
|
|
723
714
|
let body;
|
|
724
715
|
body = JSON.stringify({
|
|
725
|
-
...(input.AllowMessages
|
|
726
|
-
...(input.Name
|
|
716
|
+
...(input.AllowMessages != null && { AllowMessages: input.AllowMessages }),
|
|
717
|
+
...(input.Name != null && { Name: input.Name }),
|
|
727
718
|
});
|
|
728
719
|
return new protocol_http_1.HttpRequest({
|
|
729
720
|
protocol,
|
|
@@ -757,8 +748,7 @@ const deserializeAws_restJson1CreateAppInstanceCommandError = async (output, con
|
|
|
757
748
|
body: await parseBody(output.body, context),
|
|
758
749
|
};
|
|
759
750
|
let response;
|
|
760
|
-
|
|
761
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
751
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
762
752
|
switch (errorCode) {
|
|
763
753
|
case "BadRequestException":
|
|
764
754
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -786,10 +776,12 @@ const deserializeAws_restJson1CreateAppInstanceCommandError = async (output, con
|
|
|
786
776
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
787
777
|
default:
|
|
788
778
|
const parsedBody = parsedOutput.body;
|
|
779
|
+
const $metadata = deserializeMetadata(output);
|
|
780
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
789
781
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
790
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
782
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
791
783
|
$fault: "client",
|
|
792
|
-
$metadata
|
|
784
|
+
$metadata,
|
|
793
785
|
});
|
|
794
786
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
795
787
|
}
|
|
@@ -819,8 +811,7 @@ const deserializeAws_restJson1CreateAppInstanceAdminCommandError = async (output
|
|
|
819
811
|
body: await parseBody(output.body, context),
|
|
820
812
|
};
|
|
821
813
|
let response;
|
|
822
|
-
|
|
823
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
814
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
824
815
|
switch (errorCode) {
|
|
825
816
|
case "BadRequestException":
|
|
826
817
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -848,10 +839,12 @@ const deserializeAws_restJson1CreateAppInstanceAdminCommandError = async (output
|
|
|
848
839
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
849
840
|
default:
|
|
850
841
|
const parsedBody = parsedOutput.body;
|
|
842
|
+
const $metadata = deserializeMetadata(output);
|
|
843
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
851
844
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
852
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
845
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
853
846
|
$fault: "client",
|
|
854
|
-
$metadata
|
|
847
|
+
$metadata,
|
|
855
848
|
});
|
|
856
849
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
857
850
|
}
|
|
@@ -877,8 +870,7 @@ const deserializeAws_restJson1CreateAppInstanceUserCommandError = async (output,
|
|
|
877
870
|
body: await parseBody(output.body, context),
|
|
878
871
|
};
|
|
879
872
|
let response;
|
|
880
|
-
|
|
881
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
873
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
882
874
|
switch (errorCode) {
|
|
883
875
|
case "BadRequestException":
|
|
884
876
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -906,10 +898,12 @@ const deserializeAws_restJson1CreateAppInstanceUserCommandError = async (output,
|
|
|
906
898
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
907
899
|
default:
|
|
908
900
|
const parsedBody = parsedOutput.body;
|
|
901
|
+
const $metadata = deserializeMetadata(output);
|
|
902
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
909
903
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
910
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
904
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
911
905
|
$fault: "client",
|
|
912
|
-
$metadata
|
|
906
|
+
$metadata,
|
|
913
907
|
});
|
|
914
908
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
915
909
|
}
|
|
@@ -931,8 +925,7 @@ const deserializeAws_restJson1DeleteAppInstanceCommandError = async (output, con
|
|
|
931
925
|
body: await parseBody(output.body, context),
|
|
932
926
|
};
|
|
933
927
|
let response;
|
|
934
|
-
|
|
935
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
928
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
936
929
|
switch (errorCode) {
|
|
937
930
|
case "BadRequestException":
|
|
938
931
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -957,10 +950,12 @@ const deserializeAws_restJson1DeleteAppInstanceCommandError = async (output, con
|
|
|
957
950
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
958
951
|
default:
|
|
959
952
|
const parsedBody = parsedOutput.body;
|
|
953
|
+
const $metadata = deserializeMetadata(output);
|
|
954
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
960
955
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
961
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
956
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
962
957
|
$fault: "client",
|
|
963
|
-
$metadata
|
|
958
|
+
$metadata,
|
|
964
959
|
});
|
|
965
960
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
966
961
|
}
|
|
@@ -982,8 +977,7 @@ const deserializeAws_restJson1DeleteAppInstanceAdminCommandError = async (output
|
|
|
982
977
|
body: await parseBody(output.body, context),
|
|
983
978
|
};
|
|
984
979
|
let response;
|
|
985
|
-
|
|
986
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
980
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
987
981
|
switch (errorCode) {
|
|
988
982
|
case "BadRequestException":
|
|
989
983
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1011,10 +1005,12 @@ const deserializeAws_restJson1DeleteAppInstanceAdminCommandError = async (output
|
|
|
1011
1005
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1012
1006
|
default:
|
|
1013
1007
|
const parsedBody = parsedOutput.body;
|
|
1008
|
+
const $metadata = deserializeMetadata(output);
|
|
1009
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1014
1010
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1015
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1011
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1016
1012
|
$fault: "client",
|
|
1017
|
-
$metadata
|
|
1013
|
+
$metadata,
|
|
1018
1014
|
});
|
|
1019
1015
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1020
1016
|
}
|
|
@@ -1036,8 +1032,7 @@ const deserializeAws_restJson1DeleteAppInstanceUserCommandError = async (output,
|
|
|
1036
1032
|
body: await parseBody(output.body, context),
|
|
1037
1033
|
};
|
|
1038
1034
|
let response;
|
|
1039
|
-
|
|
1040
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1035
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1041
1036
|
switch (errorCode) {
|
|
1042
1037
|
case "BadRequestException":
|
|
1043
1038
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1065,10 +1060,12 @@ const deserializeAws_restJson1DeleteAppInstanceUserCommandError = async (output,
|
|
|
1065
1060
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1066
1061
|
default:
|
|
1067
1062
|
const parsedBody = parsedOutput.body;
|
|
1063
|
+
const $metadata = deserializeMetadata(output);
|
|
1064
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1068
1065
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1069
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1066
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1070
1067
|
$fault: "client",
|
|
1071
|
-
$metadata
|
|
1068
|
+
$metadata,
|
|
1072
1069
|
});
|
|
1073
1070
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1074
1071
|
}
|
|
@@ -1090,8 +1087,7 @@ const deserializeAws_restJson1DeregisterAppInstanceUserEndpointCommandError = as
|
|
|
1090
1087
|
body: await parseBody(output.body, context),
|
|
1091
1088
|
};
|
|
1092
1089
|
let response;
|
|
1093
|
-
|
|
1094
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1090
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1095
1091
|
switch (errorCode) {
|
|
1096
1092
|
case "BadRequestException":
|
|
1097
1093
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1113,10 +1109,12 @@ const deserializeAws_restJson1DeregisterAppInstanceUserEndpointCommandError = as
|
|
|
1113
1109
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1114
1110
|
default:
|
|
1115
1111
|
const parsedBody = parsedOutput.body;
|
|
1112
|
+
const $metadata = deserializeMetadata(output);
|
|
1113
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1116
1114
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1117
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1115
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1118
1116
|
$fault: "client",
|
|
1119
|
-
$metadata
|
|
1117
|
+
$metadata,
|
|
1120
1118
|
});
|
|
1121
1119
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1122
1120
|
}
|
|
@@ -1142,8 +1140,7 @@ const deserializeAws_restJson1DescribeAppInstanceCommandError = async (output, c
|
|
|
1142
1140
|
body: await parseBody(output.body, context),
|
|
1143
1141
|
};
|
|
1144
1142
|
let response;
|
|
1145
|
-
|
|
1146
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1143
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1147
1144
|
switch (errorCode) {
|
|
1148
1145
|
case "BadRequestException":
|
|
1149
1146
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1165,10 +1162,12 @@ const deserializeAws_restJson1DescribeAppInstanceCommandError = async (output, c
|
|
|
1165
1162
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1166
1163
|
default:
|
|
1167
1164
|
const parsedBody = parsedOutput.body;
|
|
1165
|
+
const $metadata = deserializeMetadata(output);
|
|
1166
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1168
1167
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1169
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1168
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1170
1169
|
$fault: "client",
|
|
1171
|
-
$metadata
|
|
1170
|
+
$metadata,
|
|
1172
1171
|
});
|
|
1173
1172
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1174
1173
|
}
|
|
@@ -1194,8 +1193,7 @@ const deserializeAws_restJson1DescribeAppInstanceAdminCommandError = async (outp
|
|
|
1194
1193
|
body: await parseBody(output.body, context),
|
|
1195
1194
|
};
|
|
1196
1195
|
let response;
|
|
1197
|
-
|
|
1198
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1196
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1199
1197
|
switch (errorCode) {
|
|
1200
1198
|
case "BadRequestException":
|
|
1201
1199
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1217,10 +1215,12 @@ const deserializeAws_restJson1DescribeAppInstanceAdminCommandError = async (outp
|
|
|
1217
1215
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1218
1216
|
default:
|
|
1219
1217
|
const parsedBody = parsedOutput.body;
|
|
1218
|
+
const $metadata = deserializeMetadata(output);
|
|
1219
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1220
1220
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1221
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1221
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1222
1222
|
$fault: "client",
|
|
1223
|
-
$metadata
|
|
1223
|
+
$metadata,
|
|
1224
1224
|
});
|
|
1225
1225
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1226
1226
|
}
|
|
@@ -1246,8 +1246,7 @@ const deserializeAws_restJson1DescribeAppInstanceUserCommandError = async (outpu
|
|
|
1246
1246
|
body: await parseBody(output.body, context),
|
|
1247
1247
|
};
|
|
1248
1248
|
let response;
|
|
1249
|
-
|
|
1250
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1249
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1251
1250
|
switch (errorCode) {
|
|
1252
1251
|
case "BadRequestException":
|
|
1253
1252
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1269,10 +1268,12 @@ const deserializeAws_restJson1DescribeAppInstanceUserCommandError = async (outpu
|
|
|
1269
1268
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1270
1269
|
default:
|
|
1271
1270
|
const parsedBody = parsedOutput.body;
|
|
1271
|
+
const $metadata = deserializeMetadata(output);
|
|
1272
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1272
1273
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1273
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1274
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1274
1275
|
$fault: "client",
|
|
1275
|
-
$metadata
|
|
1276
|
+
$metadata,
|
|
1276
1277
|
});
|
|
1277
1278
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1278
1279
|
}
|
|
@@ -1298,8 +1299,7 @@ const deserializeAws_restJson1DescribeAppInstanceUserEndpointCommandError = asyn
|
|
|
1298
1299
|
body: await parseBody(output.body, context),
|
|
1299
1300
|
};
|
|
1300
1301
|
let response;
|
|
1301
|
-
|
|
1302
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1302
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1303
1303
|
switch (errorCode) {
|
|
1304
1304
|
case "BadRequestException":
|
|
1305
1305
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1321,10 +1321,12 @@ const deserializeAws_restJson1DescribeAppInstanceUserEndpointCommandError = asyn
|
|
|
1321
1321
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1322
1322
|
default:
|
|
1323
1323
|
const parsedBody = parsedOutput.body;
|
|
1324
|
+
const $metadata = deserializeMetadata(output);
|
|
1325
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1324
1326
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1325
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1327
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1326
1328
|
$fault: "client",
|
|
1327
|
-
$metadata
|
|
1329
|
+
$metadata,
|
|
1328
1330
|
});
|
|
1329
1331
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1330
1332
|
}
|
|
@@ -1354,8 +1356,7 @@ const deserializeAws_restJson1GetAppInstanceRetentionSettingsCommandError = asyn
|
|
|
1354
1356
|
body: await parseBody(output.body, context),
|
|
1355
1357
|
};
|
|
1356
1358
|
let response;
|
|
1357
|
-
|
|
1358
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1359
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1359
1360
|
switch (errorCode) {
|
|
1360
1361
|
case "BadRequestException":
|
|
1361
1362
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1377,10 +1378,12 @@ const deserializeAws_restJson1GetAppInstanceRetentionSettingsCommandError = asyn
|
|
|
1377
1378
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1378
1379
|
default:
|
|
1379
1380
|
const parsedBody = parsedOutput.body;
|
|
1381
|
+
const $metadata = deserializeMetadata(output);
|
|
1382
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1380
1383
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1381
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1384
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1382
1385
|
$fault: "client",
|
|
1383
|
-
$metadata
|
|
1386
|
+
$metadata,
|
|
1384
1387
|
});
|
|
1385
1388
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1386
1389
|
}
|
|
@@ -1414,8 +1417,7 @@ const deserializeAws_restJson1ListAppInstanceAdminsCommandError = async (output,
|
|
|
1414
1417
|
body: await parseBody(output.body, context),
|
|
1415
1418
|
};
|
|
1416
1419
|
let response;
|
|
1417
|
-
|
|
1418
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1420
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1419
1421
|
switch (errorCode) {
|
|
1420
1422
|
case "BadRequestException":
|
|
1421
1423
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1440,10 +1442,12 @@ const deserializeAws_restJson1ListAppInstanceAdminsCommandError = async (output,
|
|
|
1440
1442
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1441
1443
|
default:
|
|
1442
1444
|
const parsedBody = parsedOutput.body;
|
|
1445
|
+
const $metadata = deserializeMetadata(output);
|
|
1446
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1443
1447
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1444
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1448
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1445
1449
|
$fault: "client",
|
|
1446
|
-
$metadata
|
|
1450
|
+
$metadata,
|
|
1447
1451
|
});
|
|
1448
1452
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1449
1453
|
}
|
|
@@ -1473,8 +1477,7 @@ const deserializeAws_restJson1ListAppInstancesCommandError = async (output, cont
|
|
|
1473
1477
|
body: await parseBody(output.body, context),
|
|
1474
1478
|
};
|
|
1475
1479
|
let response;
|
|
1476
|
-
|
|
1477
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1480
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1478
1481
|
switch (errorCode) {
|
|
1479
1482
|
case "BadRequestException":
|
|
1480
1483
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1496,10 +1499,12 @@ const deserializeAws_restJson1ListAppInstancesCommandError = async (output, cont
|
|
|
1496
1499
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1497
1500
|
default:
|
|
1498
1501
|
const parsedBody = parsedOutput.body;
|
|
1502
|
+
const $metadata = deserializeMetadata(output);
|
|
1503
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1499
1504
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1500
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1505
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1501
1506
|
$fault: "client",
|
|
1502
|
-
$metadata
|
|
1507
|
+
$metadata,
|
|
1503
1508
|
});
|
|
1504
1509
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1505
1510
|
}
|
|
@@ -1529,8 +1534,7 @@ const deserializeAws_restJson1ListAppInstanceUserEndpointsCommandError = async (
|
|
|
1529
1534
|
body: await parseBody(output.body, context),
|
|
1530
1535
|
};
|
|
1531
1536
|
let response;
|
|
1532
|
-
|
|
1533
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1537
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1534
1538
|
switch (errorCode) {
|
|
1535
1539
|
case "BadRequestException":
|
|
1536
1540
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1552,10 +1556,12 @@ const deserializeAws_restJson1ListAppInstanceUserEndpointsCommandError = async (
|
|
|
1552
1556
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1553
1557
|
default:
|
|
1554
1558
|
const parsedBody = parsedOutput.body;
|
|
1559
|
+
const $metadata = deserializeMetadata(output);
|
|
1560
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1555
1561
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1556
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1562
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1557
1563
|
$fault: "client",
|
|
1558
|
-
$metadata
|
|
1564
|
+
$metadata,
|
|
1559
1565
|
});
|
|
1560
1566
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1561
1567
|
}
|
|
@@ -1589,8 +1595,7 @@ const deserializeAws_restJson1ListAppInstanceUsersCommandError = async (output,
|
|
|
1589
1595
|
body: await parseBody(output.body, context),
|
|
1590
1596
|
};
|
|
1591
1597
|
let response;
|
|
1592
|
-
|
|
1593
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1598
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1594
1599
|
switch (errorCode) {
|
|
1595
1600
|
case "BadRequestException":
|
|
1596
1601
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1612,10 +1617,12 @@ const deserializeAws_restJson1ListAppInstanceUsersCommandError = async (output,
|
|
|
1612
1617
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1613
1618
|
default:
|
|
1614
1619
|
const parsedBody = parsedOutput.body;
|
|
1620
|
+
const $metadata = deserializeMetadata(output);
|
|
1621
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1615
1622
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1616
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1623
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1617
1624
|
$fault: "client",
|
|
1618
|
-
$metadata
|
|
1625
|
+
$metadata,
|
|
1619
1626
|
});
|
|
1620
1627
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1621
1628
|
}
|
|
@@ -1641,8 +1648,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1641
1648
|
body: await parseBody(output.body, context),
|
|
1642
1649
|
};
|
|
1643
1650
|
let response;
|
|
1644
|
-
|
|
1645
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1651
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1646
1652
|
switch (errorCode) {
|
|
1647
1653
|
case "BadRequestException":
|
|
1648
1654
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1664,10 +1670,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1664
1670
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1665
1671
|
default:
|
|
1666
1672
|
const parsedBody = parsedOutput.body;
|
|
1673
|
+
const $metadata = deserializeMetadata(output);
|
|
1674
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1667
1675
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1668
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1676
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1669
1677
|
$fault: "client",
|
|
1670
|
-
$metadata
|
|
1678
|
+
$metadata,
|
|
1671
1679
|
});
|
|
1672
1680
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1673
1681
|
}
|
|
@@ -1697,8 +1705,7 @@ const deserializeAws_restJson1PutAppInstanceRetentionSettingsCommandError = asyn
|
|
|
1697
1705
|
body: await parseBody(output.body, context),
|
|
1698
1706
|
};
|
|
1699
1707
|
let response;
|
|
1700
|
-
|
|
1701
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1708
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1702
1709
|
switch (errorCode) {
|
|
1703
1710
|
case "BadRequestException":
|
|
1704
1711
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1720,10 +1727,12 @@ const deserializeAws_restJson1PutAppInstanceRetentionSettingsCommandError = asyn
|
|
|
1720
1727
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1721
1728
|
default:
|
|
1722
1729
|
const parsedBody = parsedOutput.body;
|
|
1730
|
+
const $metadata = deserializeMetadata(output);
|
|
1731
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1723
1732
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1724
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1733
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1725
1734
|
$fault: "client",
|
|
1726
|
-
$metadata
|
|
1735
|
+
$metadata,
|
|
1727
1736
|
});
|
|
1728
1737
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1729
1738
|
}
|
|
@@ -1753,8 +1762,7 @@ const deserializeAws_restJson1RegisterAppInstanceUserEndpointCommandError = asyn
|
|
|
1753
1762
|
body: await parseBody(output.body, context),
|
|
1754
1763
|
};
|
|
1755
1764
|
let response;
|
|
1756
|
-
|
|
1757
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1765
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1758
1766
|
switch (errorCode) {
|
|
1759
1767
|
case "BadRequestException":
|
|
1760
1768
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1782,10 +1790,12 @@ const deserializeAws_restJson1RegisterAppInstanceUserEndpointCommandError = asyn
|
|
|
1782
1790
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1783
1791
|
default:
|
|
1784
1792
|
const parsedBody = parsedOutput.body;
|
|
1793
|
+
const $metadata = deserializeMetadata(output);
|
|
1794
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1785
1795
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1786
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1796
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1787
1797
|
$fault: "client",
|
|
1788
|
-
$metadata
|
|
1798
|
+
$metadata,
|
|
1789
1799
|
});
|
|
1790
1800
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1791
1801
|
}
|
|
@@ -1807,8 +1817,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1807
1817
|
body: await parseBody(output.body, context),
|
|
1808
1818
|
};
|
|
1809
1819
|
let response;
|
|
1810
|
-
|
|
1811
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1820
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1812
1821
|
switch (errorCode) {
|
|
1813
1822
|
case "BadRequestException":
|
|
1814
1823
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1833,10 +1842,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1833
1842
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1834
1843
|
default:
|
|
1835
1844
|
const parsedBody = parsedOutput.body;
|
|
1845
|
+
const $metadata = deserializeMetadata(output);
|
|
1846
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1836
1847
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1837
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1848
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1838
1849
|
$fault: "client",
|
|
1839
|
-
$metadata
|
|
1850
|
+
$metadata,
|
|
1840
1851
|
});
|
|
1841
1852
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1842
1853
|
}
|
|
@@ -1858,8 +1869,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1858
1869
|
body: await parseBody(output.body, context),
|
|
1859
1870
|
};
|
|
1860
1871
|
let response;
|
|
1861
|
-
|
|
1862
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1872
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1863
1873
|
switch (errorCode) {
|
|
1864
1874
|
case "BadRequestException":
|
|
1865
1875
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1881,10 +1891,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1881
1891
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1882
1892
|
default:
|
|
1883
1893
|
const parsedBody = parsedOutput.body;
|
|
1894
|
+
const $metadata = deserializeMetadata(output);
|
|
1895
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1884
1896
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1885
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1897
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1886
1898
|
$fault: "client",
|
|
1887
|
-
$metadata
|
|
1899
|
+
$metadata,
|
|
1888
1900
|
});
|
|
1889
1901
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1890
1902
|
}
|
|
@@ -1910,8 +1922,7 @@ const deserializeAws_restJson1UpdateAppInstanceCommandError = async (output, con
|
|
|
1910
1922
|
body: await parseBody(output.body, context),
|
|
1911
1923
|
};
|
|
1912
1924
|
let response;
|
|
1913
|
-
|
|
1914
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1925
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1915
1926
|
switch (errorCode) {
|
|
1916
1927
|
case "BadRequestException":
|
|
1917
1928
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1936,10 +1947,12 @@ const deserializeAws_restJson1UpdateAppInstanceCommandError = async (output, con
|
|
|
1936
1947
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1937
1948
|
default:
|
|
1938
1949
|
const parsedBody = parsedOutput.body;
|
|
1950
|
+
const $metadata = deserializeMetadata(output);
|
|
1951
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1939
1952
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1940
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1953
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1941
1954
|
$fault: "client",
|
|
1942
|
-
$metadata
|
|
1955
|
+
$metadata,
|
|
1943
1956
|
});
|
|
1944
1957
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1945
1958
|
}
|
|
@@ -1965,8 +1978,7 @@ const deserializeAws_restJson1UpdateAppInstanceUserCommandError = async (output,
|
|
|
1965
1978
|
body: await parseBody(output.body, context),
|
|
1966
1979
|
};
|
|
1967
1980
|
let response;
|
|
1968
|
-
|
|
1969
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1981
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1970
1982
|
switch (errorCode) {
|
|
1971
1983
|
case "BadRequestException":
|
|
1972
1984
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -1994,10 +2006,12 @@ const deserializeAws_restJson1UpdateAppInstanceUserCommandError = async (output,
|
|
|
1994
2006
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1995
2007
|
default:
|
|
1996
2008
|
const parsedBody = parsedOutput.body;
|
|
2009
|
+
const $metadata = deserializeMetadata(output);
|
|
2010
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1997
2011
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
1998
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2012
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1999
2013
|
$fault: "client",
|
|
2000
|
-
$metadata
|
|
2014
|
+
$metadata,
|
|
2001
2015
|
});
|
|
2002
2016
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2003
2017
|
}
|
|
@@ -2027,8 +2041,7 @@ const deserializeAws_restJson1UpdateAppInstanceUserEndpointCommandError = async
|
|
|
2027
2041
|
body: await parseBody(output.body, context),
|
|
2028
2042
|
};
|
|
2029
2043
|
let response;
|
|
2030
|
-
|
|
2031
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2044
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2032
2045
|
switch (errorCode) {
|
|
2033
2046
|
case "BadRequestException":
|
|
2034
2047
|
case "com.amazonaws.chimesdkidentity#BadRequestException":
|
|
@@ -2053,10 +2066,12 @@ const deserializeAws_restJson1UpdateAppInstanceUserEndpointCommandError = async
|
|
|
2053
2066
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2054
2067
|
default:
|
|
2055
2068
|
const parsedBody = parsedOutput.body;
|
|
2069
|
+
const $metadata = deserializeMetadata(output);
|
|
2070
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2056
2071
|
response = new ChimeSDKIdentityServiceException_1.ChimeSDKIdentityServiceException({
|
|
2057
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2072
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2058
2073
|
$fault: "client",
|
|
2059
|
-
$metadata
|
|
2074
|
+
$metadata,
|
|
2060
2075
|
});
|
|
2061
2076
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2062
2077
|
}
|
|
@@ -2183,28 +2198,26 @@ const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parse
|
|
|
2183
2198
|
};
|
|
2184
2199
|
const serializeAws_restJson1AppInstanceRetentionSettings = (input, context) => {
|
|
2185
2200
|
return {
|
|
2186
|
-
...(input.ChannelRetentionSettings
|
|
2187
|
-
input.ChannelRetentionSettings !== null && {
|
|
2201
|
+
...(input.ChannelRetentionSettings != null && {
|
|
2188
2202
|
ChannelRetentionSettings: serializeAws_restJson1ChannelRetentionSettings(input.ChannelRetentionSettings, context),
|
|
2189
2203
|
}),
|
|
2190
2204
|
};
|
|
2191
2205
|
};
|
|
2192
2206
|
const serializeAws_restJson1ChannelRetentionSettings = (input, context) => {
|
|
2193
2207
|
return {
|
|
2194
|
-
...(input.RetentionDays
|
|
2208
|
+
...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }),
|
|
2195
2209
|
};
|
|
2196
2210
|
};
|
|
2197
2211
|
const serializeAws_restJson1EndpointAttributes = (input, context) => {
|
|
2198
2212
|
return {
|
|
2199
|
-
...(input.DeviceToken
|
|
2200
|
-
...(input.VoipDeviceToken
|
|
2201
|
-
input.VoipDeviceToken !== null && { VoipDeviceToken: input.VoipDeviceToken }),
|
|
2213
|
+
...(input.DeviceToken != null && { DeviceToken: input.DeviceToken }),
|
|
2214
|
+
...(input.VoipDeviceToken != null && { VoipDeviceToken: input.VoipDeviceToken }),
|
|
2202
2215
|
};
|
|
2203
2216
|
};
|
|
2204
2217
|
const serializeAws_restJson1Tag = (input, context) => {
|
|
2205
2218
|
return {
|
|
2206
|
-
...(input.Key
|
|
2207
|
-
...(input.Value
|
|
2219
|
+
...(input.Key != null && { Key: input.Key }),
|
|
2220
|
+
...(input.Value != null && { Value: input.Value }),
|
|
2208
2221
|
};
|
|
2209
2222
|
};
|
|
2210
2223
|
const serializeAws_restJson1TagKeyList = (input, context) => {
|
|
@@ -2230,10 +2243,10 @@ const serializeAws_restJson1TagList = (input, context) => {
|
|
|
2230
2243
|
const deserializeAws_restJson1AppInstance = (output, context) => {
|
|
2231
2244
|
return {
|
|
2232
2245
|
AppInstanceArn: (0, smithy_client_1.expectString)(output.AppInstanceArn),
|
|
2233
|
-
CreatedTimestamp: output.CreatedTimestamp
|
|
2246
|
+
CreatedTimestamp: output.CreatedTimestamp != null
|
|
2234
2247
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
|
|
2235
2248
|
: undefined,
|
|
2236
|
-
LastUpdatedTimestamp: output.LastUpdatedTimestamp
|
|
2249
|
+
LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
|
|
2237
2250
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
|
|
2238
2251
|
: undefined,
|
|
2239
2252
|
Metadata: (0, smithy_client_1.expectString)(output.Metadata),
|
|
@@ -2242,11 +2255,9 @@ const deserializeAws_restJson1AppInstance = (output, context) => {
|
|
|
2242
2255
|
};
|
|
2243
2256
|
const deserializeAws_restJson1AppInstanceAdmin = (output, context) => {
|
|
2244
2257
|
return {
|
|
2245
|
-
Admin: output.Admin
|
|
2246
|
-
? deserializeAws_restJson1Identity(output.Admin, context)
|
|
2247
|
-
: undefined,
|
|
2258
|
+
Admin: output.Admin != null ? deserializeAws_restJson1Identity(output.Admin, context) : undefined,
|
|
2248
2259
|
AppInstanceArn: (0, smithy_client_1.expectString)(output.AppInstanceArn),
|
|
2249
|
-
CreatedTimestamp: output.CreatedTimestamp
|
|
2260
|
+
CreatedTimestamp: output.CreatedTimestamp != null
|
|
2250
2261
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
|
|
2251
2262
|
: undefined,
|
|
2252
2263
|
};
|
|
@@ -2264,9 +2275,7 @@ const deserializeAws_restJson1AppInstanceAdminList = (output, context) => {
|
|
|
2264
2275
|
};
|
|
2265
2276
|
const deserializeAws_restJson1AppInstanceAdminSummary = (output, context) => {
|
|
2266
2277
|
return {
|
|
2267
|
-
Admin: output.Admin
|
|
2268
|
-
? deserializeAws_restJson1Identity(output.Admin, context)
|
|
2269
|
-
: undefined,
|
|
2278
|
+
Admin: output.Admin != null ? deserializeAws_restJson1Identity(output.Admin, context) : undefined,
|
|
2270
2279
|
};
|
|
2271
2280
|
};
|
|
2272
2281
|
const deserializeAws_restJson1AppInstanceList = (output, context) => {
|
|
@@ -2282,7 +2291,7 @@ const deserializeAws_restJson1AppInstanceList = (output, context) => {
|
|
|
2282
2291
|
};
|
|
2283
2292
|
const deserializeAws_restJson1AppInstanceRetentionSettings = (output, context) => {
|
|
2284
2293
|
return {
|
|
2285
|
-
ChannelRetentionSettings: output.ChannelRetentionSettings
|
|
2294
|
+
ChannelRetentionSettings: output.ChannelRetentionSettings != null
|
|
2286
2295
|
? deserializeAws_restJson1ChannelRetentionSettings(output.ChannelRetentionSettings, context)
|
|
2287
2296
|
: undefined,
|
|
2288
2297
|
};
|
|
@@ -2297,10 +2306,10 @@ const deserializeAws_restJson1AppInstanceSummary = (output, context) => {
|
|
|
2297
2306
|
const deserializeAws_restJson1AppInstanceUser = (output, context) => {
|
|
2298
2307
|
return {
|
|
2299
2308
|
AppInstanceUserArn: (0, smithy_client_1.expectString)(output.AppInstanceUserArn),
|
|
2300
|
-
CreatedTimestamp: output.CreatedTimestamp
|
|
2309
|
+
CreatedTimestamp: output.CreatedTimestamp != null
|
|
2301
2310
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
|
|
2302
2311
|
: undefined,
|
|
2303
|
-
LastUpdatedTimestamp: output.LastUpdatedTimestamp
|
|
2312
|
+
LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
|
|
2304
2313
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
|
|
2305
2314
|
: undefined,
|
|
2306
2315
|
Metadata: (0, smithy_client_1.expectString)(output.Metadata),
|
|
@@ -2311,17 +2320,15 @@ const deserializeAws_restJson1AppInstanceUserEndpoint = (output, context) => {
|
|
|
2311
2320
|
return {
|
|
2312
2321
|
AllowMessages: (0, smithy_client_1.expectString)(output.AllowMessages),
|
|
2313
2322
|
AppInstanceUserArn: (0, smithy_client_1.expectString)(output.AppInstanceUserArn),
|
|
2314
|
-
CreatedTimestamp: output.CreatedTimestamp
|
|
2323
|
+
CreatedTimestamp: output.CreatedTimestamp != null
|
|
2315
2324
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
|
|
2316
2325
|
: undefined,
|
|
2317
|
-
EndpointAttributes: output.EndpointAttributes
|
|
2326
|
+
EndpointAttributes: output.EndpointAttributes != null
|
|
2318
2327
|
? deserializeAws_restJson1EndpointAttributes(output.EndpointAttributes, context)
|
|
2319
2328
|
: undefined,
|
|
2320
2329
|
EndpointId: (0, smithy_client_1.expectString)(output.EndpointId),
|
|
2321
|
-
EndpointState: output.EndpointState
|
|
2322
|
-
|
|
2323
|
-
: undefined,
|
|
2324
|
-
LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
|
|
2330
|
+
EndpointState: output.EndpointState != null ? deserializeAws_restJson1EndpointState(output.EndpointState, context) : undefined,
|
|
2331
|
+
LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
|
|
2325
2332
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
|
|
2326
2333
|
: undefined,
|
|
2327
2334
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
@@ -2334,9 +2341,7 @@ const deserializeAws_restJson1AppInstanceUserEndpointSummary = (output, context)
|
|
|
2334
2341
|
AllowMessages: (0, smithy_client_1.expectString)(output.AllowMessages),
|
|
2335
2342
|
AppInstanceUserArn: (0, smithy_client_1.expectString)(output.AppInstanceUserArn),
|
|
2336
2343
|
EndpointId: (0, smithy_client_1.expectString)(output.EndpointId),
|
|
2337
|
-
EndpointState: output.EndpointState
|
|
2338
|
-
? deserializeAws_restJson1EndpointState(output.EndpointState, context)
|
|
2339
|
-
: undefined,
|
|
2344
|
+
EndpointState: output.EndpointState != null ? deserializeAws_restJson1EndpointState(output.EndpointState, context) : undefined,
|
|
2340
2345
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
2341
2346
|
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
2342
2347
|
};
|
|
@@ -2459,5 +2464,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
2459
2464
|
if (data["__type"] !== undefined) {
|
|
2460
2465
|
return sanitizeErrorCode(data["__type"]);
|
|
2461
2466
|
}
|
|
2462
|
-
return "";
|
|
2463
2467
|
};
|