@aws-sdk/client-appsync 3.310.0 → 3.315.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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AppSyncServiceException as __BaseException } from "../models/AppSyncServiceException";
4
4
  import { AccessDeniedException, ApiKeyLimitExceededException, ApiKeyValidityOutOfBoundsException, ApiLimitExceededException, BadRequestException, ConcurrentModificationException, GraphQLSchemaException, InternalFailureException, LimitExceededException, NotFoundException, UnauthorizedException, } from "../models/models_0";
5
5
  export const se_AssociateApiCommand = async (input, context) => {
@@ -11,9 +11,9 @@ export const se_AssociateApiCommand = async (input, context) => {
11
11
  "/v1/domainnames/{domainName}/apiassociation";
12
12
  resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
13
13
  let body;
14
- body = JSON.stringify({
15
- ...(input.apiId != null && { apiId: input.apiId }),
16
- });
14
+ body = JSON.stringify(take(input, {
15
+ apiId: [],
16
+ }));
17
17
  return new __HttpRequest({
18
18
  protocol,
19
19
  hostname,
@@ -32,13 +32,13 @@ export const se_CreateApiCacheCommand = async (input, context) => {
32
32
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/ApiCaches";
33
33
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
34
34
  let body;
35
- body = JSON.stringify({
36
- ...(input.apiCachingBehavior != null && { apiCachingBehavior: input.apiCachingBehavior }),
37
- ...(input.atRestEncryptionEnabled != null && { atRestEncryptionEnabled: input.atRestEncryptionEnabled }),
38
- ...(input.transitEncryptionEnabled != null && { transitEncryptionEnabled: input.transitEncryptionEnabled }),
39
- ...(input.ttl != null && { ttl: input.ttl }),
40
- ...(input.type != null && { type: input.type }),
41
- });
35
+ body = JSON.stringify(take(input, {
36
+ apiCachingBehavior: [],
37
+ atRestEncryptionEnabled: [],
38
+ transitEncryptionEnabled: [],
39
+ ttl: [],
40
+ type: [],
41
+ }));
42
42
  return new __HttpRequest({
43
43
  protocol,
44
44
  hostname,
@@ -57,10 +57,10 @@ export const se_CreateApiKeyCommand = async (input, context) => {
57
57
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/apikeys";
58
58
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
59
59
  let body;
60
- body = JSON.stringify({
61
- ...(input.description != null && { description: input.description }),
62
- ...(input.expires != null && { expires: input.expires }),
63
- });
60
+ body = JSON.stringify(take(input, {
61
+ description: [],
62
+ expires: [],
63
+ }));
64
64
  return new __HttpRequest({
65
65
  protocol,
66
66
  hostname,
@@ -79,27 +79,19 @@ export const se_CreateDataSourceCommand = async (input, context) => {
79
79
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/datasources";
80
80
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
81
81
  let body;
82
- body = JSON.stringify({
83
- ...(input.description != null && { description: input.description }),
84
- ...(input.dynamodbConfig != null && { dynamodbConfig: se_DynamodbDataSourceConfig(input.dynamodbConfig, context) }),
85
- ...(input.elasticsearchConfig != null && {
86
- elasticsearchConfig: se_ElasticsearchDataSourceConfig(input.elasticsearchConfig, context),
87
- }),
88
- ...(input.eventBridgeConfig != null && {
89
- eventBridgeConfig: se_EventBridgeDataSourceConfig(input.eventBridgeConfig, context),
90
- }),
91
- ...(input.httpConfig != null && { httpConfig: se_HttpDataSourceConfig(input.httpConfig, context) }),
92
- ...(input.lambdaConfig != null && { lambdaConfig: se_LambdaDataSourceConfig(input.lambdaConfig, context) }),
93
- ...(input.name != null && { name: input.name }),
94
- ...(input.openSearchServiceConfig != null && {
95
- openSearchServiceConfig: se_OpenSearchServiceDataSourceConfig(input.openSearchServiceConfig, context),
96
- }),
97
- ...(input.relationalDatabaseConfig != null && {
98
- relationalDatabaseConfig: se_RelationalDatabaseDataSourceConfig(input.relationalDatabaseConfig, context),
99
- }),
100
- ...(input.serviceRoleArn != null && { serviceRoleArn: input.serviceRoleArn }),
101
- ...(input.type != null && { type: input.type }),
102
- });
82
+ body = JSON.stringify(take(input, {
83
+ description: [],
84
+ dynamodbConfig: (_) => _json(_),
85
+ elasticsearchConfig: (_) => _json(_),
86
+ eventBridgeConfig: (_) => _json(_),
87
+ httpConfig: (_) => _json(_),
88
+ lambdaConfig: (_) => _json(_),
89
+ name: [],
90
+ openSearchServiceConfig: (_) => _json(_),
91
+ relationalDatabaseConfig: (_) => _json(_),
92
+ serviceRoleArn: [],
93
+ type: [],
94
+ }));
103
95
  return new __HttpRequest({
104
96
  protocol,
105
97
  hostname,
@@ -117,11 +109,11 @@ export const se_CreateDomainNameCommand = async (input, context) => {
117
109
  };
118
110
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domainnames";
119
111
  let body;
120
- body = JSON.stringify({
121
- ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
122
- ...(input.description != null && { description: input.description }),
123
- ...(input.domainName != null && { domainName: input.domainName }),
124
- });
112
+ body = JSON.stringify(take(input, {
113
+ certificateArn: [],
114
+ description: [],
115
+ domainName: [],
116
+ }));
125
117
  return new __HttpRequest({
126
118
  protocol,
127
119
  hostname,
@@ -140,18 +132,18 @@ export const se_CreateFunctionCommand = async (input, context) => {
140
132
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/functions";
141
133
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
142
134
  let body;
143
- body = JSON.stringify({
144
- ...(input.code != null && { code: input.code }),
145
- ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
146
- ...(input.description != null && { description: input.description }),
147
- ...(input.functionVersion != null && { functionVersion: input.functionVersion }),
148
- ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }),
149
- ...(input.name != null && { name: input.name }),
150
- ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
151
- ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
152
- ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }),
153
- ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }),
154
- });
135
+ body = JSON.stringify(take(input, {
136
+ code: [],
137
+ dataSourceName: [],
138
+ description: [],
139
+ functionVersion: [],
140
+ maxBatchSize: [],
141
+ name: [],
142
+ requestMappingTemplate: [],
143
+ responseMappingTemplate: [],
144
+ runtime: (_) => _json(_),
145
+ syncConfig: (_) => _json(_),
146
+ }));
155
147
  return new __HttpRequest({
156
148
  protocol,
157
149
  hostname,
@@ -169,23 +161,17 @@ export const se_CreateGraphqlApiCommand = async (input, context) => {
169
161
  };
170
162
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis";
171
163
  let body;
172
- body = JSON.stringify({
173
- ...(input.additionalAuthenticationProviders != null && {
174
- additionalAuthenticationProviders: se_AdditionalAuthenticationProviders(input.additionalAuthenticationProviders, context),
175
- }),
176
- ...(input.authenticationType != null && { authenticationType: input.authenticationType }),
177
- ...(input.lambdaAuthorizerConfig != null && {
178
- lambdaAuthorizerConfig: se_LambdaAuthorizerConfig(input.lambdaAuthorizerConfig, context),
179
- }),
180
- ...(input.logConfig != null && { logConfig: se_LogConfig(input.logConfig, context) }),
181
- ...(input.name != null && { name: input.name }),
182
- ...(input.openIDConnectConfig != null && {
183
- openIDConnectConfig: se_OpenIDConnectConfig(input.openIDConnectConfig, context),
184
- }),
185
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
186
- ...(input.userPoolConfig != null && { userPoolConfig: se_UserPoolConfig(input.userPoolConfig, context) }),
187
- ...(input.xrayEnabled != null && { xrayEnabled: input.xrayEnabled }),
188
- });
164
+ body = JSON.stringify(take(input, {
165
+ additionalAuthenticationProviders: (_) => _json(_),
166
+ authenticationType: [],
167
+ lambdaAuthorizerConfig: (_) => _json(_),
168
+ logConfig: (_) => _json(_),
169
+ name: [],
170
+ openIDConnectConfig: (_) => _json(_),
171
+ tags: (_) => _json(_),
172
+ userPoolConfig: (_) => _json(_),
173
+ xrayEnabled: [],
174
+ }));
189
175
  return new __HttpRequest({
190
176
  protocol,
191
177
  hostname,
@@ -206,19 +192,19 @@ export const se_CreateResolverCommand = async (input, context) => {
206
192
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
207
193
  resolvedPath = __resolvedPath(resolvedPath, input, "typeName", () => input.typeName, "{typeName}", false);
208
194
  let body;
209
- body = JSON.stringify({
210
- ...(input.cachingConfig != null && { cachingConfig: se_CachingConfig(input.cachingConfig, context) }),
211
- ...(input.code != null && { code: input.code }),
212
- ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
213
- ...(input.fieldName != null && { fieldName: input.fieldName }),
214
- ...(input.kind != null && { kind: input.kind }),
215
- ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }),
216
- ...(input.pipelineConfig != null && { pipelineConfig: se_PipelineConfig(input.pipelineConfig, context) }),
217
- ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
218
- ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
219
- ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }),
220
- ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }),
221
- });
195
+ body = JSON.stringify(take(input, {
196
+ cachingConfig: (_) => _json(_),
197
+ code: [],
198
+ dataSourceName: [],
199
+ fieldName: [],
200
+ kind: [],
201
+ maxBatchSize: [],
202
+ pipelineConfig: (_) => _json(_),
203
+ requestMappingTemplate: [],
204
+ responseMappingTemplate: [],
205
+ runtime: (_) => _json(_),
206
+ syncConfig: (_) => _json(_),
207
+ }));
222
208
  return new __HttpRequest({
223
209
  protocol,
224
210
  hostname,
@@ -237,10 +223,10 @@ export const se_CreateTypeCommand = async (input, context) => {
237
223
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/types";
238
224
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
239
225
  let body;
240
- body = JSON.stringify({
241
- ...(input.definition != null && { definition: input.definition }),
242
- ...(input.format != null && { format: input.format }),
243
- });
226
+ body = JSON.stringify(take(input, {
227
+ definition: [],
228
+ format: [],
229
+ }));
244
230
  return new __HttpRequest({
245
231
  protocol,
246
232
  hostname,
@@ -410,12 +396,12 @@ export const se_EvaluateCodeCommand = async (input, context) => {
410
396
  };
411
397
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/dataplane-evaluatecode";
412
398
  let body;
413
- body = JSON.stringify({
414
- ...(input.code != null && { code: input.code }),
415
- ...(input.context != null && { context: input.context }),
416
- ...(input.function != null && { function: input.function }),
417
- ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }),
418
- });
399
+ body = JSON.stringify(take(input, {
400
+ code: [],
401
+ context: [],
402
+ function: [],
403
+ runtime: (_) => _json(_),
404
+ }));
419
405
  return new __HttpRequest({
420
406
  protocol,
421
407
  hostname,
@@ -433,10 +419,10 @@ export const se_EvaluateMappingTemplateCommand = async (input, context) => {
433
419
  };
434
420
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/dataplane-evaluatetemplate";
435
421
  let body;
436
- body = JSON.stringify({
437
- ...(input.context != null && { context: input.context }),
438
- ...(input.template != null && { template: input.template }),
439
- });
422
+ body = JSON.stringify(take(input, {
423
+ context: [],
424
+ template: [],
425
+ }));
440
426
  return new __HttpRequest({
441
427
  protocol,
442
428
  hostname,
@@ -834,9 +820,9 @@ export const se_StartSchemaCreationCommand = async (input, context) => {
834
820
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/schemacreation";
835
821
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
836
822
  let body;
837
- body = JSON.stringify({
838
- ...(input.definition != null && { definition: context.base64Encoder(input.definition) }),
839
- });
823
+ body = JSON.stringify(take(input, {
824
+ definition: (_) => context.base64Encoder(_),
825
+ }));
840
826
  return new __HttpRequest({
841
827
  protocol,
842
828
  hostname,
@@ -855,9 +841,9 @@ export const se_TagResourceCommand = async (input, context) => {
855
841
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
856
842
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
857
843
  let body;
858
- body = JSON.stringify({
859
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
860
- });
844
+ body = JSON.stringify(take(input, {
845
+ tags: (_) => _json(_),
846
+ }));
861
847
  return new __HttpRequest({
862
848
  protocol,
863
849
  hostname,
@@ -899,11 +885,11 @@ export const se_UpdateApiCacheCommand = async (input, context) => {
899
885
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/ApiCaches/update";
900
886
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
901
887
  let body;
902
- body = JSON.stringify({
903
- ...(input.apiCachingBehavior != null && { apiCachingBehavior: input.apiCachingBehavior }),
904
- ...(input.ttl != null && { ttl: input.ttl }),
905
- ...(input.type != null && { type: input.type }),
906
- });
888
+ body = JSON.stringify(take(input, {
889
+ apiCachingBehavior: [],
890
+ ttl: [],
891
+ type: [],
892
+ }));
907
893
  return new __HttpRequest({
908
894
  protocol,
909
895
  hostname,
@@ -923,10 +909,10 @@ export const se_UpdateApiKeyCommand = async (input, context) => {
923
909
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
924
910
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
925
911
  let body;
926
- body = JSON.stringify({
927
- ...(input.description != null && { description: input.description }),
928
- ...(input.expires != null && { expires: input.expires }),
929
- });
912
+ body = JSON.stringify(take(input, {
913
+ description: [],
914
+ expires: [],
915
+ }));
930
916
  return new __HttpRequest({
931
917
  protocol,
932
918
  hostname,
@@ -946,26 +932,18 @@ export const se_UpdateDataSourceCommand = async (input, context) => {
946
932
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
947
933
  resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
948
934
  let body;
949
- body = JSON.stringify({
950
- ...(input.description != null && { description: input.description }),
951
- ...(input.dynamodbConfig != null && { dynamodbConfig: se_DynamodbDataSourceConfig(input.dynamodbConfig, context) }),
952
- ...(input.elasticsearchConfig != null && {
953
- elasticsearchConfig: se_ElasticsearchDataSourceConfig(input.elasticsearchConfig, context),
954
- }),
955
- ...(input.eventBridgeConfig != null && {
956
- eventBridgeConfig: se_EventBridgeDataSourceConfig(input.eventBridgeConfig, context),
957
- }),
958
- ...(input.httpConfig != null && { httpConfig: se_HttpDataSourceConfig(input.httpConfig, context) }),
959
- ...(input.lambdaConfig != null && { lambdaConfig: se_LambdaDataSourceConfig(input.lambdaConfig, context) }),
960
- ...(input.openSearchServiceConfig != null && {
961
- openSearchServiceConfig: se_OpenSearchServiceDataSourceConfig(input.openSearchServiceConfig, context),
962
- }),
963
- ...(input.relationalDatabaseConfig != null && {
964
- relationalDatabaseConfig: se_RelationalDatabaseDataSourceConfig(input.relationalDatabaseConfig, context),
965
- }),
966
- ...(input.serviceRoleArn != null && { serviceRoleArn: input.serviceRoleArn }),
967
- ...(input.type != null && { type: input.type }),
968
- });
935
+ body = JSON.stringify(take(input, {
936
+ description: [],
937
+ dynamodbConfig: (_) => _json(_),
938
+ elasticsearchConfig: (_) => _json(_),
939
+ eventBridgeConfig: (_) => _json(_),
940
+ httpConfig: (_) => _json(_),
941
+ lambdaConfig: (_) => _json(_),
942
+ openSearchServiceConfig: (_) => _json(_),
943
+ relationalDatabaseConfig: (_) => _json(_),
944
+ serviceRoleArn: [],
945
+ type: [],
946
+ }));
969
947
  return new __HttpRequest({
970
948
  protocol,
971
949
  hostname,
@@ -984,9 +962,9 @@ export const se_UpdateDomainNameCommand = async (input, context) => {
984
962
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domainnames/{domainName}";
985
963
  resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
986
964
  let body;
987
- body = JSON.stringify({
988
- ...(input.description != null && { description: input.description }),
989
- });
965
+ body = JSON.stringify(take(input, {
966
+ description: [],
967
+ }));
990
968
  return new __HttpRequest({
991
969
  protocol,
992
970
  hostname,
@@ -1006,18 +984,18 @@ export const se_UpdateFunctionCommand = async (input, context) => {
1006
984
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
1007
985
  resolvedPath = __resolvedPath(resolvedPath, input, "functionId", () => input.functionId, "{functionId}", false);
1008
986
  let body;
1009
- body = JSON.stringify({
1010
- ...(input.code != null && { code: input.code }),
1011
- ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
1012
- ...(input.description != null && { description: input.description }),
1013
- ...(input.functionVersion != null && { functionVersion: input.functionVersion }),
1014
- ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }),
1015
- ...(input.name != null && { name: input.name }),
1016
- ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
1017
- ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
1018
- ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }),
1019
- ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }),
1020
- });
987
+ body = JSON.stringify(take(input, {
988
+ code: [],
989
+ dataSourceName: [],
990
+ description: [],
991
+ functionVersion: [],
992
+ maxBatchSize: [],
993
+ name: [],
994
+ requestMappingTemplate: [],
995
+ responseMappingTemplate: [],
996
+ runtime: (_) => _json(_),
997
+ syncConfig: (_) => _json(_),
998
+ }));
1021
999
  return new __HttpRequest({
1022
1000
  protocol,
1023
1001
  hostname,
@@ -1036,22 +1014,16 @@ export const se_UpdateGraphqlApiCommand = async (input, context) => {
1036
1014
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}";
1037
1015
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
1038
1016
  let body;
1039
- body = JSON.stringify({
1040
- ...(input.additionalAuthenticationProviders != null && {
1041
- additionalAuthenticationProviders: se_AdditionalAuthenticationProviders(input.additionalAuthenticationProviders, context),
1042
- }),
1043
- ...(input.authenticationType != null && { authenticationType: input.authenticationType }),
1044
- ...(input.lambdaAuthorizerConfig != null && {
1045
- lambdaAuthorizerConfig: se_LambdaAuthorizerConfig(input.lambdaAuthorizerConfig, context),
1046
- }),
1047
- ...(input.logConfig != null && { logConfig: se_LogConfig(input.logConfig, context) }),
1048
- ...(input.name != null && { name: input.name }),
1049
- ...(input.openIDConnectConfig != null && {
1050
- openIDConnectConfig: se_OpenIDConnectConfig(input.openIDConnectConfig, context),
1051
- }),
1052
- ...(input.userPoolConfig != null && { userPoolConfig: se_UserPoolConfig(input.userPoolConfig, context) }),
1053
- ...(input.xrayEnabled != null && { xrayEnabled: input.xrayEnabled }),
1054
- });
1017
+ body = JSON.stringify(take(input, {
1018
+ additionalAuthenticationProviders: (_) => _json(_),
1019
+ authenticationType: [],
1020
+ lambdaAuthorizerConfig: (_) => _json(_),
1021
+ logConfig: (_) => _json(_),
1022
+ name: [],
1023
+ openIDConnectConfig: (_) => _json(_),
1024
+ userPoolConfig: (_) => _json(_),
1025
+ xrayEnabled: [],
1026
+ }));
1055
1027
  return new __HttpRequest({
1056
1028
  protocol,
1057
1029
  hostname,
@@ -1073,18 +1045,18 @@ export const se_UpdateResolverCommand = async (input, context) => {
1073
1045
  resolvedPath = __resolvedPath(resolvedPath, input, "typeName", () => input.typeName, "{typeName}", false);
1074
1046
  resolvedPath = __resolvedPath(resolvedPath, input, "fieldName", () => input.fieldName, "{fieldName}", false);
1075
1047
  let body;
1076
- body = JSON.stringify({
1077
- ...(input.cachingConfig != null && { cachingConfig: se_CachingConfig(input.cachingConfig, context) }),
1078
- ...(input.code != null && { code: input.code }),
1079
- ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
1080
- ...(input.kind != null && { kind: input.kind }),
1081
- ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }),
1082
- ...(input.pipelineConfig != null && { pipelineConfig: se_PipelineConfig(input.pipelineConfig, context) }),
1083
- ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
1084
- ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
1085
- ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }),
1086
- ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }),
1087
- });
1048
+ body = JSON.stringify(take(input, {
1049
+ cachingConfig: (_) => _json(_),
1050
+ code: [],
1051
+ dataSourceName: [],
1052
+ kind: [],
1053
+ maxBatchSize: [],
1054
+ pipelineConfig: (_) => _json(_),
1055
+ requestMappingTemplate: [],
1056
+ responseMappingTemplate: [],
1057
+ runtime: (_) => _json(_),
1058
+ syncConfig: (_) => _json(_),
1059
+ }));
1088
1060
  return new __HttpRequest({
1089
1061
  protocol,
1090
1062
  hostname,
@@ -1104,10 +1076,10 @@ export const se_UpdateTypeCommand = async (input, context) => {
1104
1076
  resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
1105
1077
  resolvedPath = __resolvedPath(resolvedPath, input, "typeName", () => input.typeName, "{typeName}", false);
1106
1078
  let body;
1107
- body = JSON.stringify({
1108
- ...(input.definition != null && { definition: input.definition }),
1109
- ...(input.format != null && { format: input.format }),
1110
- });
1079
+ body = JSON.stringify(take(input, {
1080
+ definition: [],
1081
+ format: [],
1082
+ }));
1111
1083
  return new __HttpRequest({
1112
1084
  protocol,
1113
1085
  hostname,
@@ -1126,9 +1098,10 @@ export const de_AssociateApiCommand = async (output, context) => {
1126
1098
  $metadata: deserializeMetadata(output),
1127
1099
  });
1128
1100
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1129
- if (data.apiAssociation != null) {
1130
- contents.apiAssociation = de_ApiAssociation(data.apiAssociation, context);
1131
- }
1101
+ const doc = take(data, {
1102
+ apiAssociation: _json,
1103
+ });
1104
+ Object.assign(contents, doc);
1132
1105
  return contents;
1133
1106
  };
1134
1107
  const de_AssociateApiCommandError = async (output, context) => {
@@ -1152,10 +1125,9 @@ const de_AssociateApiCommandError = async (output, context) => {
1152
1125
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1153
1126
  default:
1154
1127
  const parsedBody = parsedOutput.body;
1155
- throwDefaultError({
1128
+ return throwDefaultError({
1156
1129
  output,
1157
1130
  parsedBody,
1158
- exceptionCtor: __BaseException,
1159
1131
  errorCode,
1160
1132
  });
1161
1133
  }
@@ -1168,9 +1140,10 @@ export const de_CreateApiCacheCommand = async (output, context) => {
1168
1140
  $metadata: deserializeMetadata(output),
1169
1141
  });
1170
1142
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1171
- if (data.apiCache != null) {
1172
- contents.apiCache = de_ApiCache(data.apiCache, context);
1173
- }
1143
+ const doc = take(data, {
1144
+ apiCache: _json,
1145
+ });
1146
+ Object.assign(contents, doc);
1174
1147
  return contents;
1175
1148
  };
1176
1149
  const de_CreateApiCacheCommandError = async (output, context) => {
@@ -1197,10 +1170,9 @@ const de_CreateApiCacheCommandError = async (output, context) => {
1197
1170
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1198
1171
  default:
1199
1172
  const parsedBody = parsedOutput.body;
1200
- throwDefaultError({
1173
+ return throwDefaultError({
1201
1174
  output,
1202
1175
  parsedBody,
1203
- exceptionCtor: __BaseException,
1204
1176
  errorCode,
1205
1177
  });
1206
1178
  }
@@ -1213,9 +1185,10 @@ export const de_CreateApiKeyCommand = async (output, context) => {
1213
1185
  $metadata: deserializeMetadata(output),
1214
1186
  });
1215
1187
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1216
- if (data.apiKey != null) {
1217
- contents.apiKey = de_ApiKey(data.apiKey, context);
1218
- }
1188
+ const doc = take(data, {
1189
+ apiKey: _json,
1190
+ });
1191
+ Object.assign(contents, doc);
1219
1192
  return contents;
1220
1193
  };
1221
1194
  const de_CreateApiKeyCommandError = async (output, context) => {
@@ -1248,10 +1221,9 @@ const de_CreateApiKeyCommandError = async (output, context) => {
1248
1221
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1249
1222
  default:
1250
1223
  const parsedBody = parsedOutput.body;
1251
- throwDefaultError({
1224
+ return throwDefaultError({
1252
1225
  output,
1253
1226
  parsedBody,
1254
- exceptionCtor: __BaseException,
1255
1227
  errorCode,
1256
1228
  });
1257
1229
  }
@@ -1264,9 +1236,10 @@ export const de_CreateDataSourceCommand = async (output, context) => {
1264
1236
  $metadata: deserializeMetadata(output),
1265
1237
  });
1266
1238
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1267
- if (data.dataSource != null) {
1268
- contents.dataSource = de_DataSource(data.dataSource, context);
1269
- }
1239
+ const doc = take(data, {
1240
+ dataSource: _json,
1241
+ });
1242
+ Object.assign(contents, doc);
1270
1243
  return contents;
1271
1244
  };
1272
1245
  const de_CreateDataSourceCommandError = async (output, context) => {
@@ -1293,10 +1266,9 @@ const de_CreateDataSourceCommandError = async (output, context) => {
1293
1266
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1294
1267
  default:
1295
1268
  const parsedBody = parsedOutput.body;
1296
- throwDefaultError({
1269
+ return throwDefaultError({
1297
1270
  output,
1298
1271
  parsedBody,
1299
- exceptionCtor: __BaseException,
1300
1272
  errorCode,
1301
1273
  });
1302
1274
  }
@@ -1309,9 +1281,10 @@ export const de_CreateDomainNameCommand = async (output, context) => {
1309
1281
  $metadata: deserializeMetadata(output),
1310
1282
  });
1311
1283
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1312
- if (data.domainNameConfig != null) {
1313
- contents.domainNameConfig = de_DomainNameConfig(data.domainNameConfig, context);
1314
- }
1284
+ const doc = take(data, {
1285
+ domainNameConfig: _json,
1286
+ });
1287
+ Object.assign(contents, doc);
1315
1288
  return contents;
1316
1289
  };
1317
1290
  const de_CreateDomainNameCommandError = async (output, context) => {
@@ -1332,10 +1305,9 @@ const de_CreateDomainNameCommandError = async (output, context) => {
1332
1305
  throw await de_InternalFailureExceptionRes(parsedOutput, context);
1333
1306
  default:
1334
1307
  const parsedBody = parsedOutput.body;
1335
- throwDefaultError({
1308
+ return throwDefaultError({
1336
1309
  output,
1337
1310
  parsedBody,
1338
- exceptionCtor: __BaseException,
1339
1311
  errorCode,
1340
1312
  });
1341
1313
  }
@@ -1348,9 +1320,10 @@ export const de_CreateFunctionCommand = async (output, context) => {
1348
1320
  $metadata: deserializeMetadata(output),
1349
1321
  });
1350
1322
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1351
- if (data.functionConfiguration != null) {
1352
- contents.functionConfiguration = de_FunctionConfiguration(data.functionConfiguration, context);
1353
- }
1323
+ const doc = take(data, {
1324
+ functionConfiguration: _json,
1325
+ });
1326
+ Object.assign(contents, doc);
1354
1327
  return contents;
1355
1328
  };
1356
1329
  const de_CreateFunctionCommandError = async (output, context) => {
@@ -1374,10 +1347,9 @@ const de_CreateFunctionCommandError = async (output, context) => {
1374
1347
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1375
1348
  default:
1376
1349
  const parsedBody = parsedOutput.body;
1377
- throwDefaultError({
1350
+ return throwDefaultError({
1378
1351
  output,
1379
1352
  parsedBody,
1380
- exceptionCtor: __BaseException,
1381
1353
  errorCode,
1382
1354
  });
1383
1355
  }
@@ -1390,9 +1362,10 @@ export const de_CreateGraphqlApiCommand = async (output, context) => {
1390
1362
  $metadata: deserializeMetadata(output),
1391
1363
  });
1392
1364
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1393
- if (data.graphqlApi != null) {
1394
- contents.graphqlApi = de_GraphqlApi(data.graphqlApi, context);
1395
- }
1365
+ const doc = take(data, {
1366
+ graphqlApi: _json,
1367
+ });
1368
+ Object.assign(contents, doc);
1396
1369
  return contents;
1397
1370
  };
1398
1371
  const de_CreateGraphqlApiCommandError = async (output, context) => {
@@ -1422,10 +1395,9 @@ const de_CreateGraphqlApiCommandError = async (output, context) => {
1422
1395
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1423
1396
  default:
1424
1397
  const parsedBody = parsedOutput.body;
1425
- throwDefaultError({
1398
+ return throwDefaultError({
1426
1399
  output,
1427
1400
  parsedBody,
1428
- exceptionCtor: __BaseException,
1429
1401
  errorCode,
1430
1402
  });
1431
1403
  }
@@ -1438,9 +1410,10 @@ export const de_CreateResolverCommand = async (output, context) => {
1438
1410
  $metadata: deserializeMetadata(output),
1439
1411
  });
1440
1412
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1441
- if (data.resolver != null) {
1442
- contents.resolver = de_Resolver(data.resolver, context);
1443
- }
1413
+ const doc = take(data, {
1414
+ resolver: _json,
1415
+ });
1416
+ Object.assign(contents, doc);
1444
1417
  return contents;
1445
1418
  };
1446
1419
  const de_CreateResolverCommandError = async (output, context) => {
@@ -1467,10 +1440,9 @@ const de_CreateResolverCommandError = async (output, context) => {
1467
1440
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1468
1441
  default:
1469
1442
  const parsedBody = parsedOutput.body;
1470
- throwDefaultError({
1443
+ return throwDefaultError({
1471
1444
  output,
1472
1445
  parsedBody,
1473
- exceptionCtor: __BaseException,
1474
1446
  errorCode,
1475
1447
  });
1476
1448
  }
@@ -1483,9 +1455,10 @@ export const de_CreateTypeCommand = async (output, context) => {
1483
1455
  $metadata: deserializeMetadata(output),
1484
1456
  });
1485
1457
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1486
- if (data.type != null) {
1487
- contents.type = de_Type(data.type, context);
1488
- }
1458
+ const doc = take(data, {
1459
+ type: _json,
1460
+ });
1461
+ Object.assign(contents, doc);
1489
1462
  return contents;
1490
1463
  };
1491
1464
  const de_CreateTypeCommandError = async (output, context) => {
@@ -1512,10 +1485,9 @@ const de_CreateTypeCommandError = async (output, context) => {
1512
1485
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1513
1486
  default:
1514
1487
  const parsedBody = parsedOutput.body;
1515
- throwDefaultError({
1488
+ return throwDefaultError({
1516
1489
  output,
1517
1490
  parsedBody,
1518
- exceptionCtor: __BaseException,
1519
1491
  errorCode,
1520
1492
  });
1521
1493
  }
@@ -1554,10 +1526,9 @@ const de_DeleteApiCacheCommandError = async (output, context) => {
1554
1526
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1555
1527
  default:
1556
1528
  const parsedBody = parsedOutput.body;
1557
- throwDefaultError({
1529
+ return throwDefaultError({
1558
1530
  output,
1559
1531
  parsedBody,
1560
- exceptionCtor: __BaseException,
1561
1532
  errorCode,
1562
1533
  });
1563
1534
  }
@@ -1593,10 +1564,9 @@ const de_DeleteApiKeyCommandError = async (output, context) => {
1593
1564
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1594
1565
  default:
1595
1566
  const parsedBody = parsedOutput.body;
1596
- throwDefaultError({
1567
+ return throwDefaultError({
1597
1568
  output,
1598
1569
  parsedBody,
1599
- exceptionCtor: __BaseException,
1600
1570
  errorCode,
1601
1571
  });
1602
1572
  }
@@ -1635,10 +1605,9 @@ const de_DeleteDataSourceCommandError = async (output, context) => {
1635
1605
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1636
1606
  default:
1637
1607
  const parsedBody = parsedOutput.body;
1638
- throwDefaultError({
1608
+ return throwDefaultError({
1639
1609
  output,
1640
1610
  parsedBody,
1641
- exceptionCtor: __BaseException,
1642
1611
  errorCode,
1643
1612
  });
1644
1613
  }
@@ -1677,10 +1646,9 @@ const de_DeleteDomainNameCommandError = async (output, context) => {
1677
1646
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1678
1647
  default:
1679
1648
  const parsedBody = parsedOutput.body;
1680
- throwDefaultError({
1649
+ return throwDefaultError({
1681
1650
  output,
1682
1651
  parsedBody,
1683
- exceptionCtor: __BaseException,
1684
1652
  errorCode,
1685
1653
  });
1686
1654
  }
@@ -1716,10 +1684,9 @@ const de_DeleteFunctionCommandError = async (output, context) => {
1716
1684
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1717
1685
  default:
1718
1686
  const parsedBody = parsedOutput.body;
1719
- throwDefaultError({
1687
+ return throwDefaultError({
1720
1688
  output,
1721
1689
  parsedBody,
1722
- exceptionCtor: __BaseException,
1723
1690
  errorCode,
1724
1691
  });
1725
1692
  }
@@ -1761,10 +1728,9 @@ const de_DeleteGraphqlApiCommandError = async (output, context) => {
1761
1728
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1762
1729
  default:
1763
1730
  const parsedBody = parsedOutput.body;
1764
- throwDefaultError({
1731
+ return throwDefaultError({
1765
1732
  output,
1766
1733
  parsedBody,
1767
- exceptionCtor: __BaseException,
1768
1734
  errorCode,
1769
1735
  });
1770
1736
  }
@@ -1803,10 +1769,9 @@ const de_DeleteResolverCommandError = async (output, context) => {
1803
1769
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1804
1770
  default:
1805
1771
  const parsedBody = parsedOutput.body;
1806
- throwDefaultError({
1772
+ return throwDefaultError({
1807
1773
  output,
1808
1774
  parsedBody,
1809
- exceptionCtor: __BaseException,
1810
1775
  errorCode,
1811
1776
  });
1812
1777
  }
@@ -1845,10 +1810,9 @@ const de_DeleteTypeCommandError = async (output, context) => {
1845
1810
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1846
1811
  default:
1847
1812
  const parsedBody = parsedOutput.body;
1848
- throwDefaultError({
1813
+ return throwDefaultError({
1849
1814
  output,
1850
1815
  parsedBody,
1851
- exceptionCtor: __BaseException,
1852
1816
  errorCode,
1853
1817
  });
1854
1818
  }
@@ -1887,10 +1851,9 @@ const de_DisassociateApiCommandError = async (output, context) => {
1887
1851
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1888
1852
  default:
1889
1853
  const parsedBody = parsedOutput.body;
1890
- throwDefaultError({
1854
+ return throwDefaultError({
1891
1855
  output,
1892
1856
  parsedBody,
1893
- exceptionCtor: __BaseException,
1894
1857
  errorCode,
1895
1858
  });
1896
1859
  }
@@ -1903,15 +1866,12 @@ export const de_EvaluateCodeCommand = async (output, context) => {
1903
1866
  $metadata: deserializeMetadata(output),
1904
1867
  });
1905
1868
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1906
- if (data.error != null) {
1907
- contents.error = de_EvaluateCodeErrorDetail(data.error, context);
1908
- }
1909
- if (data.evaluationResult != null) {
1910
- contents.evaluationResult = __expectString(data.evaluationResult);
1911
- }
1912
- if (data.logs != null) {
1913
- contents.logs = de_Logs(data.logs, context);
1914
- }
1869
+ const doc = take(data, {
1870
+ error: _json,
1871
+ evaluationResult: __expectString,
1872
+ logs: _json,
1873
+ });
1874
+ Object.assign(contents, doc);
1915
1875
  return contents;
1916
1876
  };
1917
1877
  const de_EvaluateCodeCommandError = async (output, context) => {
@@ -1932,10 +1892,9 @@ const de_EvaluateCodeCommandError = async (output, context) => {
1932
1892
  throw await de_InternalFailureExceptionRes(parsedOutput, context);
1933
1893
  default:
1934
1894
  const parsedBody = parsedOutput.body;
1935
- throwDefaultError({
1895
+ return throwDefaultError({
1936
1896
  output,
1937
1897
  parsedBody,
1938
- exceptionCtor: __BaseException,
1939
1898
  errorCode,
1940
1899
  });
1941
1900
  }
@@ -1948,15 +1907,12 @@ export const de_EvaluateMappingTemplateCommand = async (output, context) => {
1948
1907
  $metadata: deserializeMetadata(output),
1949
1908
  });
1950
1909
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1951
- if (data.error != null) {
1952
- contents.error = de_ErrorDetail(data.error, context);
1953
- }
1954
- if (data.evaluationResult != null) {
1955
- contents.evaluationResult = __expectString(data.evaluationResult);
1956
- }
1957
- if (data.logs != null) {
1958
- contents.logs = de_Logs(data.logs, context);
1959
- }
1910
+ const doc = take(data, {
1911
+ error: _json,
1912
+ evaluationResult: __expectString,
1913
+ logs: _json,
1914
+ });
1915
+ Object.assign(contents, doc);
1960
1916
  return contents;
1961
1917
  };
1962
1918
  const de_EvaluateMappingTemplateCommandError = async (output, context) => {
@@ -1977,10 +1933,9 @@ const de_EvaluateMappingTemplateCommandError = async (output, context) => {
1977
1933
  throw await de_InternalFailureExceptionRes(parsedOutput, context);
1978
1934
  default:
1979
1935
  const parsedBody = parsedOutput.body;
1980
- throwDefaultError({
1936
+ return throwDefaultError({
1981
1937
  output,
1982
1938
  parsedBody,
1983
- exceptionCtor: __BaseException,
1984
1939
  errorCode,
1985
1940
  });
1986
1941
  }
@@ -2019,10 +1974,9 @@ const de_FlushApiCacheCommandError = async (output, context) => {
2019
1974
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2020
1975
  default:
2021
1976
  const parsedBody = parsedOutput.body;
2022
- throwDefaultError({
1977
+ return throwDefaultError({
2023
1978
  output,
2024
1979
  parsedBody,
2025
- exceptionCtor: __BaseException,
2026
1980
  errorCode,
2027
1981
  });
2028
1982
  }
@@ -2035,9 +1989,10 @@ export const de_GetApiAssociationCommand = async (output, context) => {
2035
1989
  $metadata: deserializeMetadata(output),
2036
1990
  });
2037
1991
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2038
- if (data.apiAssociation != null) {
2039
- contents.apiAssociation = de_ApiAssociation(data.apiAssociation, context);
2040
- }
1992
+ const doc = take(data, {
1993
+ apiAssociation: _json,
1994
+ });
1995
+ Object.assign(contents, doc);
2041
1996
  return contents;
2042
1997
  };
2043
1998
  const de_GetApiAssociationCommandError = async (output, context) => {
@@ -2061,10 +2016,9 @@ const de_GetApiAssociationCommandError = async (output, context) => {
2061
2016
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2062
2017
  default:
2063
2018
  const parsedBody = parsedOutput.body;
2064
- throwDefaultError({
2019
+ return throwDefaultError({
2065
2020
  output,
2066
2021
  parsedBody,
2067
- exceptionCtor: __BaseException,
2068
2022
  errorCode,
2069
2023
  });
2070
2024
  }
@@ -2077,9 +2031,10 @@ export const de_GetApiCacheCommand = async (output, context) => {
2077
2031
  $metadata: deserializeMetadata(output),
2078
2032
  });
2079
2033
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2080
- if (data.apiCache != null) {
2081
- contents.apiCache = de_ApiCache(data.apiCache, context);
2082
- }
2034
+ const doc = take(data, {
2035
+ apiCache: _json,
2036
+ });
2037
+ Object.assign(contents, doc);
2083
2038
  return contents;
2084
2039
  };
2085
2040
  const de_GetApiCacheCommandError = async (output, context) => {
@@ -2106,10 +2061,9 @@ const de_GetApiCacheCommandError = async (output, context) => {
2106
2061
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2107
2062
  default:
2108
2063
  const parsedBody = parsedOutput.body;
2109
- throwDefaultError({
2064
+ return throwDefaultError({
2110
2065
  output,
2111
2066
  parsedBody,
2112
- exceptionCtor: __BaseException,
2113
2067
  errorCode,
2114
2068
  });
2115
2069
  }
@@ -2122,9 +2076,10 @@ export const de_GetDataSourceCommand = async (output, context) => {
2122
2076
  $metadata: deserializeMetadata(output),
2123
2077
  });
2124
2078
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2125
- if (data.dataSource != null) {
2126
- contents.dataSource = de_DataSource(data.dataSource, context);
2127
- }
2079
+ const doc = take(data, {
2080
+ dataSource: _json,
2081
+ });
2082
+ Object.assign(contents, doc);
2128
2083
  return contents;
2129
2084
  };
2130
2085
  const de_GetDataSourceCommandError = async (output, context) => {
@@ -2151,10 +2106,9 @@ const de_GetDataSourceCommandError = async (output, context) => {
2151
2106
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2152
2107
  default:
2153
2108
  const parsedBody = parsedOutput.body;
2154
- throwDefaultError({
2109
+ return throwDefaultError({
2155
2110
  output,
2156
2111
  parsedBody,
2157
- exceptionCtor: __BaseException,
2158
2112
  errorCode,
2159
2113
  });
2160
2114
  }
@@ -2167,9 +2121,10 @@ export const de_GetDomainNameCommand = async (output, context) => {
2167
2121
  $metadata: deserializeMetadata(output),
2168
2122
  });
2169
2123
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2170
- if (data.domainNameConfig != null) {
2171
- contents.domainNameConfig = de_DomainNameConfig(data.domainNameConfig, context);
2172
- }
2124
+ const doc = take(data, {
2125
+ domainNameConfig: _json,
2126
+ });
2127
+ Object.assign(contents, doc);
2173
2128
  return contents;
2174
2129
  };
2175
2130
  const de_GetDomainNameCommandError = async (output, context) => {
@@ -2193,10 +2148,9 @@ const de_GetDomainNameCommandError = async (output, context) => {
2193
2148
  throw await de_NotFoundExceptionRes(parsedOutput, context);
2194
2149
  default:
2195
2150
  const parsedBody = parsedOutput.body;
2196
- throwDefaultError({
2151
+ return throwDefaultError({
2197
2152
  output,
2198
2153
  parsedBody,
2199
- exceptionCtor: __BaseException,
2200
2154
  errorCode,
2201
2155
  });
2202
2156
  }
@@ -2209,9 +2163,10 @@ export const de_GetFunctionCommand = async (output, context) => {
2209
2163
  $metadata: deserializeMetadata(output),
2210
2164
  });
2211
2165
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2212
- if (data.functionConfiguration != null) {
2213
- contents.functionConfiguration = de_FunctionConfiguration(data.functionConfiguration, context);
2214
- }
2166
+ const doc = take(data, {
2167
+ functionConfiguration: _json,
2168
+ });
2169
+ Object.assign(contents, doc);
2215
2170
  return contents;
2216
2171
  };
2217
2172
  const de_GetFunctionCommandError = async (output, context) => {
@@ -2232,10 +2187,9 @@ const de_GetFunctionCommandError = async (output, context) => {
2232
2187
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2233
2188
  default:
2234
2189
  const parsedBody = parsedOutput.body;
2235
- throwDefaultError({
2190
+ return throwDefaultError({
2236
2191
  output,
2237
2192
  parsedBody,
2238
- exceptionCtor: __BaseException,
2239
2193
  errorCode,
2240
2194
  });
2241
2195
  }
@@ -2248,9 +2202,10 @@ export const de_GetGraphqlApiCommand = async (output, context) => {
2248
2202
  $metadata: deserializeMetadata(output),
2249
2203
  });
2250
2204
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2251
- if (data.graphqlApi != null) {
2252
- contents.graphqlApi = de_GraphqlApi(data.graphqlApi, context);
2253
- }
2205
+ const doc = take(data, {
2206
+ graphqlApi: _json,
2207
+ });
2208
+ Object.assign(contents, doc);
2254
2209
  return contents;
2255
2210
  };
2256
2211
  const de_GetGraphqlApiCommandError = async (output, context) => {
@@ -2277,10 +2232,9 @@ const de_GetGraphqlApiCommandError = async (output, context) => {
2277
2232
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2278
2233
  default:
2279
2234
  const parsedBody = parsedOutput.body;
2280
- throwDefaultError({
2235
+ return throwDefaultError({
2281
2236
  output,
2282
2237
  parsedBody,
2283
- exceptionCtor: __BaseException,
2284
2238
  errorCode,
2285
2239
  });
2286
2240
  }
@@ -2317,10 +2271,9 @@ const de_GetIntrospectionSchemaCommandError = async (output, context) => {
2317
2271
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2318
2272
  default:
2319
2273
  const parsedBody = parsedOutput.body;
2320
- throwDefaultError({
2274
+ return throwDefaultError({
2321
2275
  output,
2322
2276
  parsedBody,
2323
- exceptionCtor: __BaseException,
2324
2277
  errorCode,
2325
2278
  });
2326
2279
  }
@@ -2333,9 +2286,10 @@ export const de_GetResolverCommand = async (output, context) => {
2333
2286
  $metadata: deserializeMetadata(output),
2334
2287
  });
2335
2288
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2336
- if (data.resolver != null) {
2337
- contents.resolver = de_Resolver(data.resolver, context);
2338
- }
2289
+ const doc = take(data, {
2290
+ resolver: _json,
2291
+ });
2292
+ Object.assign(contents, doc);
2339
2293
  return contents;
2340
2294
  };
2341
2295
  const de_GetResolverCommandError = async (output, context) => {
@@ -2356,10 +2310,9 @@ const de_GetResolverCommandError = async (output, context) => {
2356
2310
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2357
2311
  default:
2358
2312
  const parsedBody = parsedOutput.body;
2359
- throwDefaultError({
2313
+ return throwDefaultError({
2360
2314
  output,
2361
2315
  parsedBody,
2362
- exceptionCtor: __BaseException,
2363
2316
  errorCode,
2364
2317
  });
2365
2318
  }
@@ -2372,12 +2325,11 @@ export const de_GetSchemaCreationStatusCommand = async (output, context) => {
2372
2325
  $metadata: deserializeMetadata(output),
2373
2326
  });
2374
2327
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2375
- if (data.details != null) {
2376
- contents.details = __expectString(data.details);
2377
- }
2378
- if (data.status != null) {
2379
- contents.status = __expectString(data.status);
2380
- }
2328
+ const doc = take(data, {
2329
+ details: __expectString,
2330
+ status: __expectString,
2331
+ });
2332
+ Object.assign(contents, doc);
2381
2333
  return contents;
2382
2334
  };
2383
2335
  const de_GetSchemaCreationStatusCommandError = async (output, context) => {
@@ -2401,10 +2353,9 @@ const de_GetSchemaCreationStatusCommandError = async (output, context) => {
2401
2353
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2402
2354
  default:
2403
2355
  const parsedBody = parsedOutput.body;
2404
- throwDefaultError({
2356
+ return throwDefaultError({
2405
2357
  output,
2406
2358
  parsedBody,
2407
- exceptionCtor: __BaseException,
2408
2359
  errorCode,
2409
2360
  });
2410
2361
  }
@@ -2417,9 +2368,10 @@ export const de_GetTypeCommand = async (output, context) => {
2417
2368
  $metadata: deserializeMetadata(output),
2418
2369
  });
2419
2370
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2420
- if (data.type != null) {
2421
- contents.type = de_Type(data.type, context);
2422
- }
2371
+ const doc = take(data, {
2372
+ type: _json,
2373
+ });
2374
+ Object.assign(contents, doc);
2423
2375
  return contents;
2424
2376
  };
2425
2377
  const de_GetTypeCommandError = async (output, context) => {
@@ -2446,10 +2398,9 @@ const de_GetTypeCommandError = async (output, context) => {
2446
2398
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2447
2399
  default:
2448
2400
  const parsedBody = parsedOutput.body;
2449
- throwDefaultError({
2401
+ return throwDefaultError({
2450
2402
  output,
2451
2403
  parsedBody,
2452
- exceptionCtor: __BaseException,
2453
2404
  errorCode,
2454
2405
  });
2455
2406
  }
@@ -2462,12 +2413,11 @@ export const de_ListApiKeysCommand = async (output, context) => {
2462
2413
  $metadata: deserializeMetadata(output),
2463
2414
  });
2464
2415
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2465
- if (data.apiKeys != null) {
2466
- contents.apiKeys = de_ApiKeys(data.apiKeys, context);
2467
- }
2468
- if (data.nextToken != null) {
2469
- contents.nextToken = __expectString(data.nextToken);
2470
- }
2416
+ const doc = take(data, {
2417
+ apiKeys: _json,
2418
+ nextToken: __expectString,
2419
+ });
2420
+ Object.assign(contents, doc);
2471
2421
  return contents;
2472
2422
  };
2473
2423
  const de_ListApiKeysCommandError = async (output, context) => {
@@ -2491,10 +2441,9 @@ const de_ListApiKeysCommandError = async (output, context) => {
2491
2441
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2492
2442
  default:
2493
2443
  const parsedBody = parsedOutput.body;
2494
- throwDefaultError({
2444
+ return throwDefaultError({
2495
2445
  output,
2496
2446
  parsedBody,
2497
- exceptionCtor: __BaseException,
2498
2447
  errorCode,
2499
2448
  });
2500
2449
  }
@@ -2507,12 +2456,11 @@ export const de_ListDataSourcesCommand = async (output, context) => {
2507
2456
  $metadata: deserializeMetadata(output),
2508
2457
  });
2509
2458
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2510
- if (data.dataSources != null) {
2511
- contents.dataSources = de_DataSources(data.dataSources, context);
2512
- }
2513
- if (data.nextToken != null) {
2514
- contents.nextToken = __expectString(data.nextToken);
2515
- }
2459
+ const doc = take(data, {
2460
+ dataSources: _json,
2461
+ nextToken: __expectString,
2462
+ });
2463
+ Object.assign(contents, doc);
2516
2464
  return contents;
2517
2465
  };
2518
2466
  const de_ListDataSourcesCommandError = async (output, context) => {
@@ -2536,10 +2484,9 @@ const de_ListDataSourcesCommandError = async (output, context) => {
2536
2484
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2537
2485
  default:
2538
2486
  const parsedBody = parsedOutput.body;
2539
- throwDefaultError({
2487
+ return throwDefaultError({
2540
2488
  output,
2541
2489
  parsedBody,
2542
- exceptionCtor: __BaseException,
2543
2490
  errorCode,
2544
2491
  });
2545
2492
  }
@@ -2552,12 +2499,11 @@ export const de_ListDomainNamesCommand = async (output, context) => {
2552
2499
  $metadata: deserializeMetadata(output),
2553
2500
  });
2554
2501
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2555
- if (data.domainNameConfigs != null) {
2556
- contents.domainNameConfigs = de_DomainNameConfigs(data.domainNameConfigs, context);
2557
- }
2558
- if (data.nextToken != null) {
2559
- contents.nextToken = __expectString(data.nextToken);
2560
- }
2502
+ const doc = take(data, {
2503
+ domainNameConfigs: _json,
2504
+ nextToken: __expectString,
2505
+ });
2506
+ Object.assign(contents, doc);
2561
2507
  return contents;
2562
2508
  };
2563
2509
  const de_ListDomainNamesCommandError = async (output, context) => {
@@ -2578,10 +2524,9 @@ const de_ListDomainNamesCommandError = async (output, context) => {
2578
2524
  throw await de_InternalFailureExceptionRes(parsedOutput, context);
2579
2525
  default:
2580
2526
  const parsedBody = parsedOutput.body;
2581
- throwDefaultError({
2527
+ return throwDefaultError({
2582
2528
  output,
2583
2529
  parsedBody,
2584
- exceptionCtor: __BaseException,
2585
2530
  errorCode,
2586
2531
  });
2587
2532
  }
@@ -2594,12 +2539,11 @@ export const de_ListFunctionsCommand = async (output, context) => {
2594
2539
  $metadata: deserializeMetadata(output),
2595
2540
  });
2596
2541
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2597
- if (data.functions != null) {
2598
- contents.functions = de_Functions(data.functions, context);
2599
- }
2600
- if (data.nextToken != null) {
2601
- contents.nextToken = __expectString(data.nextToken);
2602
- }
2542
+ const doc = take(data, {
2543
+ functions: _json,
2544
+ nextToken: __expectString,
2545
+ });
2546
+ Object.assign(contents, doc);
2603
2547
  return contents;
2604
2548
  };
2605
2549
  const de_ListFunctionsCommandError = async (output, context) => {
@@ -2623,10 +2567,9 @@ const de_ListFunctionsCommandError = async (output, context) => {
2623
2567
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2624
2568
  default:
2625
2569
  const parsedBody = parsedOutput.body;
2626
- throwDefaultError({
2570
+ return throwDefaultError({
2627
2571
  output,
2628
2572
  parsedBody,
2629
- exceptionCtor: __BaseException,
2630
2573
  errorCode,
2631
2574
  });
2632
2575
  }
@@ -2639,12 +2582,11 @@ export const de_ListGraphqlApisCommand = async (output, context) => {
2639
2582
  $metadata: deserializeMetadata(output),
2640
2583
  });
2641
2584
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2642
- if (data.graphqlApis != null) {
2643
- contents.graphqlApis = de_GraphqlApis(data.graphqlApis, context);
2644
- }
2645
- if (data.nextToken != null) {
2646
- contents.nextToken = __expectString(data.nextToken);
2647
- }
2585
+ const doc = take(data, {
2586
+ graphqlApis: _json,
2587
+ nextToken: __expectString,
2588
+ });
2589
+ Object.assign(contents, doc);
2648
2590
  return contents;
2649
2591
  };
2650
2592
  const de_ListGraphqlApisCommandError = async (output, context) => {
@@ -2665,10 +2607,9 @@ const de_ListGraphqlApisCommandError = async (output, context) => {
2665
2607
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2666
2608
  default:
2667
2609
  const parsedBody = parsedOutput.body;
2668
- throwDefaultError({
2610
+ return throwDefaultError({
2669
2611
  output,
2670
2612
  parsedBody,
2671
- exceptionCtor: __BaseException,
2672
2613
  errorCode,
2673
2614
  });
2674
2615
  }
@@ -2681,12 +2622,11 @@ export const de_ListResolversCommand = async (output, context) => {
2681
2622
  $metadata: deserializeMetadata(output),
2682
2623
  });
2683
2624
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2684
- if (data.nextToken != null) {
2685
- contents.nextToken = __expectString(data.nextToken);
2686
- }
2687
- if (data.resolvers != null) {
2688
- contents.resolvers = de_Resolvers(data.resolvers, context);
2689
- }
2625
+ const doc = take(data, {
2626
+ nextToken: __expectString,
2627
+ resolvers: _json,
2628
+ });
2629
+ Object.assign(contents, doc);
2690
2630
  return contents;
2691
2631
  };
2692
2632
  const de_ListResolversCommandError = async (output, context) => {
@@ -2710,10 +2650,9 @@ const de_ListResolversCommandError = async (output, context) => {
2710
2650
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2711
2651
  default:
2712
2652
  const parsedBody = parsedOutput.body;
2713
- throwDefaultError({
2653
+ return throwDefaultError({
2714
2654
  output,
2715
2655
  parsedBody,
2716
- exceptionCtor: __BaseException,
2717
2656
  errorCode,
2718
2657
  });
2719
2658
  }
@@ -2726,12 +2665,11 @@ export const de_ListResolversByFunctionCommand = async (output, context) => {
2726
2665
  $metadata: deserializeMetadata(output),
2727
2666
  });
2728
2667
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2729
- if (data.nextToken != null) {
2730
- contents.nextToken = __expectString(data.nextToken);
2731
- }
2732
- if (data.resolvers != null) {
2733
- contents.resolvers = de_Resolvers(data.resolvers, context);
2734
- }
2668
+ const doc = take(data, {
2669
+ nextToken: __expectString,
2670
+ resolvers: _json,
2671
+ });
2672
+ Object.assign(contents, doc);
2735
2673
  return contents;
2736
2674
  };
2737
2675
  const de_ListResolversByFunctionCommandError = async (output, context) => {
@@ -2755,10 +2693,9 @@ const de_ListResolversByFunctionCommandError = async (output, context) => {
2755
2693
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2756
2694
  default:
2757
2695
  const parsedBody = parsedOutput.body;
2758
- throwDefaultError({
2696
+ return throwDefaultError({
2759
2697
  output,
2760
2698
  parsedBody,
2761
- exceptionCtor: __BaseException,
2762
2699
  errorCode,
2763
2700
  });
2764
2701
  }
@@ -2771,9 +2708,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2771
2708
  $metadata: deserializeMetadata(output),
2772
2709
  });
2773
2710
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2774
- if (data.tags != null) {
2775
- contents.tags = de_TagMap(data.tags, context);
2776
- }
2711
+ const doc = take(data, {
2712
+ tags: _json,
2713
+ });
2714
+ Object.assign(contents, doc);
2777
2715
  return contents;
2778
2716
  };
2779
2717
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -2803,10 +2741,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2803
2741
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2804
2742
  default:
2805
2743
  const parsedBody = parsedOutput.body;
2806
- throwDefaultError({
2744
+ return throwDefaultError({
2807
2745
  output,
2808
2746
  parsedBody,
2809
- exceptionCtor: __BaseException,
2810
2747
  errorCode,
2811
2748
  });
2812
2749
  }
@@ -2819,12 +2756,11 @@ export const de_ListTypesCommand = async (output, context) => {
2819
2756
  $metadata: deserializeMetadata(output),
2820
2757
  });
2821
2758
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2822
- if (data.nextToken != null) {
2823
- contents.nextToken = __expectString(data.nextToken);
2824
- }
2825
- if (data.types != null) {
2826
- contents.types = de_TypeList(data.types, context);
2827
- }
2759
+ const doc = take(data, {
2760
+ nextToken: __expectString,
2761
+ types: _json,
2762
+ });
2763
+ Object.assign(contents, doc);
2828
2764
  return contents;
2829
2765
  };
2830
2766
  const de_ListTypesCommandError = async (output, context) => {
@@ -2851,10 +2787,9 @@ const de_ListTypesCommandError = async (output, context) => {
2851
2787
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2852
2788
  default:
2853
2789
  const parsedBody = parsedOutput.body;
2854
- throwDefaultError({
2790
+ return throwDefaultError({
2855
2791
  output,
2856
2792
  parsedBody,
2857
- exceptionCtor: __BaseException,
2858
2793
  errorCode,
2859
2794
  });
2860
2795
  }
@@ -2867,9 +2802,10 @@ export const de_StartSchemaCreationCommand = async (output, context) => {
2867
2802
  $metadata: deserializeMetadata(output),
2868
2803
  });
2869
2804
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2870
- if (data.status != null) {
2871
- contents.status = __expectString(data.status);
2872
- }
2805
+ const doc = take(data, {
2806
+ status: __expectString,
2807
+ });
2808
+ Object.assign(contents, doc);
2873
2809
  return contents;
2874
2810
  };
2875
2811
  const de_StartSchemaCreationCommandError = async (output, context) => {
@@ -2896,10 +2832,9 @@ const de_StartSchemaCreationCommandError = async (output, context) => {
2896
2832
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2897
2833
  default:
2898
2834
  const parsedBody = parsedOutput.body;
2899
- throwDefaultError({
2835
+ return throwDefaultError({
2900
2836
  output,
2901
2837
  parsedBody,
2902
- exceptionCtor: __BaseException,
2903
2838
  errorCode,
2904
2839
  });
2905
2840
  }
@@ -2941,10 +2876,9 @@ const de_TagResourceCommandError = async (output, context) => {
2941
2876
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2942
2877
  default:
2943
2878
  const parsedBody = parsedOutput.body;
2944
- throwDefaultError({
2879
+ return throwDefaultError({
2945
2880
  output,
2946
2881
  parsedBody,
2947
- exceptionCtor: __BaseException,
2948
2882
  errorCode,
2949
2883
  });
2950
2884
  }
@@ -2986,10 +2920,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2986
2920
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2987
2921
  default:
2988
2922
  const parsedBody = parsedOutput.body;
2989
- throwDefaultError({
2923
+ return throwDefaultError({
2990
2924
  output,
2991
2925
  parsedBody,
2992
- exceptionCtor: __BaseException,
2993
2926
  errorCode,
2994
2927
  });
2995
2928
  }
@@ -3002,9 +2935,10 @@ export const de_UpdateApiCacheCommand = async (output, context) => {
3002
2935
  $metadata: deserializeMetadata(output),
3003
2936
  });
3004
2937
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3005
- if (data.apiCache != null) {
3006
- contents.apiCache = de_ApiCache(data.apiCache, context);
3007
- }
2938
+ const doc = take(data, {
2939
+ apiCache: _json,
2940
+ });
2941
+ Object.assign(contents, doc);
3008
2942
  return contents;
3009
2943
  };
3010
2944
  const de_UpdateApiCacheCommandError = async (output, context) => {
@@ -3031,10 +2965,9 @@ const de_UpdateApiCacheCommandError = async (output, context) => {
3031
2965
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3032
2966
  default:
3033
2967
  const parsedBody = parsedOutput.body;
3034
- throwDefaultError({
2968
+ return throwDefaultError({
3035
2969
  output,
3036
2970
  parsedBody,
3037
- exceptionCtor: __BaseException,
3038
2971
  errorCode,
3039
2972
  });
3040
2973
  }
@@ -3047,9 +2980,10 @@ export const de_UpdateApiKeyCommand = async (output, context) => {
3047
2980
  $metadata: deserializeMetadata(output),
3048
2981
  });
3049
2982
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3050
- if (data.apiKey != null) {
3051
- contents.apiKey = de_ApiKey(data.apiKey, context);
3052
- }
2983
+ const doc = take(data, {
2984
+ apiKey: _json,
2985
+ });
2986
+ Object.assign(contents, doc);
3053
2987
  return contents;
3054
2988
  };
3055
2989
  const de_UpdateApiKeyCommandError = async (output, context) => {
@@ -3079,10 +3013,9 @@ const de_UpdateApiKeyCommandError = async (output, context) => {
3079
3013
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3080
3014
  default:
3081
3015
  const parsedBody = parsedOutput.body;
3082
- throwDefaultError({
3016
+ return throwDefaultError({
3083
3017
  output,
3084
3018
  parsedBody,
3085
- exceptionCtor: __BaseException,
3086
3019
  errorCode,
3087
3020
  });
3088
3021
  }
@@ -3095,9 +3028,10 @@ export const de_UpdateDataSourceCommand = async (output, context) => {
3095
3028
  $metadata: deserializeMetadata(output),
3096
3029
  });
3097
3030
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3098
- if (data.dataSource != null) {
3099
- contents.dataSource = de_DataSource(data.dataSource, context);
3100
- }
3031
+ const doc = take(data, {
3032
+ dataSource: _json,
3033
+ });
3034
+ Object.assign(contents, doc);
3101
3035
  return contents;
3102
3036
  };
3103
3037
  const de_UpdateDataSourceCommandError = async (output, context) => {
@@ -3124,10 +3058,9 @@ const de_UpdateDataSourceCommandError = async (output, context) => {
3124
3058
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3125
3059
  default:
3126
3060
  const parsedBody = parsedOutput.body;
3127
- throwDefaultError({
3061
+ return throwDefaultError({
3128
3062
  output,
3129
3063
  parsedBody,
3130
- exceptionCtor: __BaseException,
3131
3064
  errorCode,
3132
3065
  });
3133
3066
  }
@@ -3140,9 +3073,10 @@ export const de_UpdateDomainNameCommand = async (output, context) => {
3140
3073
  $metadata: deserializeMetadata(output),
3141
3074
  });
3142
3075
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3143
- if (data.domainNameConfig != null) {
3144
- contents.domainNameConfig = de_DomainNameConfig(data.domainNameConfig, context);
3145
- }
3076
+ const doc = take(data, {
3077
+ domainNameConfig: _json,
3078
+ });
3079
+ Object.assign(contents, doc);
3146
3080
  return contents;
3147
3081
  };
3148
3082
  const de_UpdateDomainNameCommandError = async (output, context) => {
@@ -3169,10 +3103,9 @@ const de_UpdateDomainNameCommandError = async (output, context) => {
3169
3103
  throw await de_NotFoundExceptionRes(parsedOutput, context);
3170
3104
  default:
3171
3105
  const parsedBody = parsedOutput.body;
3172
- throwDefaultError({
3106
+ return throwDefaultError({
3173
3107
  output,
3174
3108
  parsedBody,
3175
- exceptionCtor: __BaseException,
3176
3109
  errorCode,
3177
3110
  });
3178
3111
  }
@@ -3185,9 +3118,10 @@ export const de_UpdateFunctionCommand = async (output, context) => {
3185
3118
  $metadata: deserializeMetadata(output),
3186
3119
  });
3187
3120
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3188
- if (data.functionConfiguration != null) {
3189
- contents.functionConfiguration = de_FunctionConfiguration(data.functionConfiguration, context);
3190
- }
3121
+ const doc = take(data, {
3122
+ functionConfiguration: _json,
3123
+ });
3124
+ Object.assign(contents, doc);
3191
3125
  return contents;
3192
3126
  };
3193
3127
  const de_UpdateFunctionCommandError = async (output, context) => {
@@ -3211,10 +3145,9 @@ const de_UpdateFunctionCommandError = async (output, context) => {
3211
3145
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3212
3146
  default:
3213
3147
  const parsedBody = parsedOutput.body;
3214
- throwDefaultError({
3148
+ return throwDefaultError({
3215
3149
  output,
3216
3150
  parsedBody,
3217
- exceptionCtor: __BaseException,
3218
3151
  errorCode,
3219
3152
  });
3220
3153
  }
@@ -3227,9 +3160,10 @@ export const de_UpdateGraphqlApiCommand = async (output, context) => {
3227
3160
  $metadata: deserializeMetadata(output),
3228
3161
  });
3229
3162
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3230
- if (data.graphqlApi != null) {
3231
- contents.graphqlApi = de_GraphqlApi(data.graphqlApi, context);
3232
- }
3163
+ const doc = take(data, {
3164
+ graphqlApi: _json,
3165
+ });
3166
+ Object.assign(contents, doc);
3233
3167
  return contents;
3234
3168
  };
3235
3169
  const de_UpdateGraphqlApiCommandError = async (output, context) => {
@@ -3259,10 +3193,9 @@ const de_UpdateGraphqlApiCommandError = async (output, context) => {
3259
3193
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3260
3194
  default:
3261
3195
  const parsedBody = parsedOutput.body;
3262
- throwDefaultError({
3196
+ return throwDefaultError({
3263
3197
  output,
3264
3198
  parsedBody,
3265
- exceptionCtor: __BaseException,
3266
3199
  errorCode,
3267
3200
  });
3268
3201
  }
@@ -3275,9 +3208,10 @@ export const de_UpdateResolverCommand = async (output, context) => {
3275
3208
  $metadata: deserializeMetadata(output),
3276
3209
  });
3277
3210
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3278
- if (data.resolver != null) {
3279
- contents.resolver = de_Resolver(data.resolver, context);
3280
- }
3211
+ const doc = take(data, {
3212
+ resolver: _json,
3213
+ });
3214
+ Object.assign(contents, doc);
3281
3215
  return contents;
3282
3216
  };
3283
3217
  const de_UpdateResolverCommandError = async (output, context) => {
@@ -3304,10 +3238,9 @@ const de_UpdateResolverCommandError = async (output, context) => {
3304
3238
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3305
3239
  default:
3306
3240
  const parsedBody = parsedOutput.body;
3307
- throwDefaultError({
3241
+ return throwDefaultError({
3308
3242
  output,
3309
3243
  parsedBody,
3310
- exceptionCtor: __BaseException,
3311
3244
  errorCode,
3312
3245
  });
3313
3246
  }
@@ -3320,9 +3253,10 @@ export const de_UpdateTypeCommand = async (output, context) => {
3320
3253
  $metadata: deserializeMetadata(output),
3321
3254
  });
3322
3255
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3323
- if (data.type != null) {
3324
- contents.type = de_Type(data.type, context);
3325
- }
3256
+ const doc = take(data, {
3257
+ type: _json,
3258
+ });
3259
+ Object.assign(contents, doc);
3326
3260
  return contents;
3327
3261
  };
3328
3262
  const de_UpdateTypeCommandError = async (output, context) => {
@@ -3349,21 +3283,21 @@ const de_UpdateTypeCommandError = async (output, context) => {
3349
3283
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3350
3284
  default:
3351
3285
  const parsedBody = parsedOutput.body;
3352
- throwDefaultError({
3286
+ return throwDefaultError({
3353
3287
  output,
3354
3288
  parsedBody,
3355
- exceptionCtor: __BaseException,
3356
3289
  errorCode,
3357
3290
  });
3358
3291
  }
3359
3292
  };
3360
- const map = __map;
3293
+ const throwDefaultError = withBaseException(__BaseException);
3361
3294
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3362
3295
  const contents = map({});
3363
3296
  const data = parsedOutput.body;
3364
- if (data.message != null) {
3365
- contents.message = __expectString(data.message);
3366
- }
3297
+ const doc = take(data, {
3298
+ message: __expectString,
3299
+ });
3300
+ Object.assign(contents, doc);
3367
3301
  const exception = new AccessDeniedException({
3368
3302
  $metadata: deserializeMetadata(parsedOutput),
3369
3303
  ...contents,
@@ -3373,9 +3307,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3373
3307
  const de_ApiKeyLimitExceededExceptionRes = async (parsedOutput, context) => {
3374
3308
  const contents = map({});
3375
3309
  const data = parsedOutput.body;
3376
- if (data.message != null) {
3377
- contents.message = __expectString(data.message);
3378
- }
3310
+ const doc = take(data, {
3311
+ message: __expectString,
3312
+ });
3313
+ Object.assign(contents, doc);
3379
3314
  const exception = new ApiKeyLimitExceededException({
3380
3315
  $metadata: deserializeMetadata(parsedOutput),
3381
3316
  ...contents,
@@ -3385,9 +3320,10 @@ const de_ApiKeyLimitExceededExceptionRes = async (parsedOutput, context) => {
3385
3320
  const de_ApiKeyValidityOutOfBoundsExceptionRes = async (parsedOutput, context) => {
3386
3321
  const contents = map({});
3387
3322
  const data = parsedOutput.body;
3388
- if (data.message != null) {
3389
- contents.message = __expectString(data.message);
3390
- }
3323
+ const doc = take(data, {
3324
+ message: __expectString,
3325
+ });
3326
+ Object.assign(contents, doc);
3391
3327
  const exception = new ApiKeyValidityOutOfBoundsException({
3392
3328
  $metadata: deserializeMetadata(parsedOutput),
3393
3329
  ...contents,
@@ -3397,9 +3333,10 @@ const de_ApiKeyValidityOutOfBoundsExceptionRes = async (parsedOutput, context) =
3397
3333
  const de_ApiLimitExceededExceptionRes = async (parsedOutput, context) => {
3398
3334
  const contents = map({});
3399
3335
  const data = parsedOutput.body;
3400
- if (data.message != null) {
3401
- contents.message = __expectString(data.message);
3402
- }
3336
+ const doc = take(data, {
3337
+ message: __expectString,
3338
+ });
3339
+ Object.assign(contents, doc);
3403
3340
  const exception = new ApiLimitExceededException({
3404
3341
  $metadata: deserializeMetadata(parsedOutput),
3405
3342
  ...contents,
@@ -3409,15 +3346,12 @@ const de_ApiLimitExceededExceptionRes = async (parsedOutput, context) => {
3409
3346
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
3410
3347
  const contents = map({});
3411
3348
  const data = parsedOutput.body;
3412
- if (data.detail != null) {
3413
- contents.detail = de_BadRequestDetail(data.detail, context);
3414
- }
3415
- if (data.message != null) {
3416
- contents.message = __expectString(data.message);
3417
- }
3418
- if (data.reason != null) {
3419
- contents.reason = __expectString(data.reason);
3420
- }
3349
+ const doc = take(data, {
3350
+ detail: _json,
3351
+ message: __expectString,
3352
+ reason: __expectString,
3353
+ });
3354
+ Object.assign(contents, doc);
3421
3355
  const exception = new BadRequestException({
3422
3356
  $metadata: deserializeMetadata(parsedOutput),
3423
3357
  ...contents,
@@ -3427,9 +3361,10 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
3427
3361
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
3428
3362
  const contents = map({});
3429
3363
  const data = parsedOutput.body;
3430
- if (data.message != null) {
3431
- contents.message = __expectString(data.message);
3432
- }
3364
+ const doc = take(data, {
3365
+ message: __expectString,
3366
+ });
3367
+ Object.assign(contents, doc);
3433
3368
  const exception = new ConcurrentModificationException({
3434
3369
  $metadata: deserializeMetadata(parsedOutput),
3435
3370
  ...contents,
@@ -3439,9 +3374,10 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
3439
3374
  const de_GraphQLSchemaExceptionRes = async (parsedOutput, context) => {
3440
3375
  const contents = map({});
3441
3376
  const data = parsedOutput.body;
3442
- if (data.message != null) {
3443
- contents.message = __expectString(data.message);
3444
- }
3377
+ const doc = take(data, {
3378
+ message: __expectString,
3379
+ });
3380
+ Object.assign(contents, doc);
3445
3381
  const exception = new GraphQLSchemaException({
3446
3382
  $metadata: deserializeMetadata(parsedOutput),
3447
3383
  ...contents,
@@ -3451,9 +3387,10 @@ const de_GraphQLSchemaExceptionRes = async (parsedOutput, context) => {
3451
3387
  const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
3452
3388
  const contents = map({});
3453
3389
  const data = parsedOutput.body;
3454
- if (data.message != null) {
3455
- contents.message = __expectString(data.message);
3456
- }
3390
+ const doc = take(data, {
3391
+ message: __expectString,
3392
+ });
3393
+ Object.assign(contents, doc);
3457
3394
  const exception = new InternalFailureException({
3458
3395
  $metadata: deserializeMetadata(parsedOutput),
3459
3396
  ...contents,
@@ -3463,9 +3400,10 @@ const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
3463
3400
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
3464
3401
  const contents = map({});
3465
3402
  const data = parsedOutput.body;
3466
- if (data.message != null) {
3467
- contents.message = __expectString(data.message);
3468
- }
3403
+ const doc = take(data, {
3404
+ message: __expectString,
3405
+ });
3406
+ Object.assign(contents, doc);
3469
3407
  const exception = new LimitExceededException({
3470
3408
  $metadata: deserializeMetadata(parsedOutput),
3471
3409
  ...contents,
@@ -3475,9 +3413,10 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
3475
3413
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
3476
3414
  const contents = map({});
3477
3415
  const data = parsedOutput.body;
3478
- if (data.message != null) {
3479
- contents.message = __expectString(data.message);
3480
- }
3416
+ const doc = take(data, {
3417
+ message: __expectString,
3418
+ });
3419
+ Object.assign(contents, doc);
3481
3420
  const exception = new NotFoundException({
3482
3421
  $metadata: deserializeMetadata(parsedOutput),
3483
3422
  ...contents,
@@ -3487,657 +3426,16 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
3487
3426
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
3488
3427
  const contents = map({});
3489
3428
  const data = parsedOutput.body;
3490
- if (data.message != null) {
3491
- contents.message = __expectString(data.message);
3492
- }
3429
+ const doc = take(data, {
3430
+ message: __expectString,
3431
+ });
3432
+ Object.assign(contents, doc);
3493
3433
  const exception = new UnauthorizedException({
3494
3434
  $metadata: deserializeMetadata(parsedOutput),
3495
3435
  ...contents,
3496
3436
  });
3497
3437
  return __decorateServiceException(exception, parsedOutput.body);
3498
3438
  };
3499
- const se_AdditionalAuthenticationProvider = (input, context) => {
3500
- return {
3501
- ...(input.authenticationType != null && { authenticationType: input.authenticationType }),
3502
- ...(input.lambdaAuthorizerConfig != null && {
3503
- lambdaAuthorizerConfig: se_LambdaAuthorizerConfig(input.lambdaAuthorizerConfig, context),
3504
- }),
3505
- ...(input.openIDConnectConfig != null && {
3506
- openIDConnectConfig: se_OpenIDConnectConfig(input.openIDConnectConfig, context),
3507
- }),
3508
- ...(input.userPoolConfig != null && { userPoolConfig: se_CognitoUserPoolConfig(input.userPoolConfig, context) }),
3509
- };
3510
- };
3511
- const se_AdditionalAuthenticationProviders = (input, context) => {
3512
- return input
3513
- .filter((e) => e != null)
3514
- .map((entry) => {
3515
- return se_AdditionalAuthenticationProvider(entry, context);
3516
- });
3517
- };
3518
- const se_AppSyncRuntime = (input, context) => {
3519
- return {
3520
- ...(input.name != null && { name: input.name }),
3521
- ...(input.runtimeVersion != null && { runtimeVersion: input.runtimeVersion }),
3522
- };
3523
- };
3524
- const se_AuthorizationConfig = (input, context) => {
3525
- return {
3526
- ...(input.authorizationType != null && { authorizationType: input.authorizationType }),
3527
- ...(input.awsIamConfig != null && { awsIamConfig: se_AwsIamConfig(input.awsIamConfig, context) }),
3528
- };
3529
- };
3530
- const se_AwsIamConfig = (input, context) => {
3531
- return {
3532
- ...(input.signingRegion != null && { signingRegion: input.signingRegion }),
3533
- ...(input.signingServiceName != null && { signingServiceName: input.signingServiceName }),
3534
- };
3535
- };
3536
- const se_CachingConfig = (input, context) => {
3537
- return {
3538
- ...(input.cachingKeys != null && { cachingKeys: se_CachingKeys(input.cachingKeys, context) }),
3539
- ...(input.ttl != null && { ttl: input.ttl }),
3540
- };
3541
- };
3542
- const se_CachingKeys = (input, context) => {
3543
- return input
3544
- .filter((e) => e != null)
3545
- .map((entry) => {
3546
- return entry;
3547
- });
3548
- };
3549
- const se_CognitoUserPoolConfig = (input, context) => {
3550
- return {
3551
- ...(input.appIdClientRegex != null && { appIdClientRegex: input.appIdClientRegex }),
3552
- ...(input.awsRegion != null && { awsRegion: input.awsRegion }),
3553
- ...(input.userPoolId != null && { userPoolId: input.userPoolId }),
3554
- };
3555
- };
3556
- const se_DeltaSyncConfig = (input, context) => {
3557
- return {
3558
- ...(input.baseTableTTL != null && { baseTableTTL: input.baseTableTTL }),
3559
- ...(input.deltaSyncTableName != null && { deltaSyncTableName: input.deltaSyncTableName }),
3560
- ...(input.deltaSyncTableTTL != null && { deltaSyncTableTTL: input.deltaSyncTableTTL }),
3561
- };
3562
- };
3563
- const se_DynamodbDataSourceConfig = (input, context) => {
3564
- return {
3565
- ...(input.awsRegion != null && { awsRegion: input.awsRegion }),
3566
- ...(input.deltaSyncConfig != null && { deltaSyncConfig: se_DeltaSyncConfig(input.deltaSyncConfig, context) }),
3567
- ...(input.tableName != null && { tableName: input.tableName }),
3568
- ...(input.useCallerCredentials != null && { useCallerCredentials: input.useCallerCredentials }),
3569
- ...(input.versioned != null && { versioned: input.versioned }),
3570
- };
3571
- };
3572
- const se_ElasticsearchDataSourceConfig = (input, context) => {
3573
- return {
3574
- ...(input.awsRegion != null && { awsRegion: input.awsRegion }),
3575
- ...(input.endpoint != null && { endpoint: input.endpoint }),
3576
- };
3577
- };
3578
- const se_EventBridgeDataSourceConfig = (input, context) => {
3579
- return {
3580
- ...(input.eventBusArn != null && { eventBusArn: input.eventBusArn }),
3581
- };
3582
- };
3583
- const se_FunctionsIds = (input, context) => {
3584
- return input
3585
- .filter((e) => e != null)
3586
- .map((entry) => {
3587
- return entry;
3588
- });
3589
- };
3590
- const se_HttpDataSourceConfig = (input, context) => {
3591
- return {
3592
- ...(input.authorizationConfig != null && {
3593
- authorizationConfig: se_AuthorizationConfig(input.authorizationConfig, context),
3594
- }),
3595
- ...(input.endpoint != null && { endpoint: input.endpoint }),
3596
- };
3597
- };
3598
- const se_LambdaAuthorizerConfig = (input, context) => {
3599
- return {
3600
- ...(input.authorizerResultTtlInSeconds != null && {
3601
- authorizerResultTtlInSeconds: input.authorizerResultTtlInSeconds,
3602
- }),
3603
- ...(input.authorizerUri != null && { authorizerUri: input.authorizerUri }),
3604
- ...(input.identityValidationExpression != null && {
3605
- identityValidationExpression: input.identityValidationExpression,
3606
- }),
3607
- };
3608
- };
3609
- const se_LambdaConflictHandlerConfig = (input, context) => {
3610
- return {
3611
- ...(input.lambdaConflictHandlerArn != null && { lambdaConflictHandlerArn: input.lambdaConflictHandlerArn }),
3612
- };
3613
- };
3614
- const se_LambdaDataSourceConfig = (input, context) => {
3615
- return {
3616
- ...(input.lambdaFunctionArn != null && { lambdaFunctionArn: input.lambdaFunctionArn }),
3617
- };
3618
- };
3619
- const se_LogConfig = (input, context) => {
3620
- return {
3621
- ...(input.cloudWatchLogsRoleArn != null && { cloudWatchLogsRoleArn: input.cloudWatchLogsRoleArn }),
3622
- ...(input.excludeVerboseContent != null && { excludeVerboseContent: input.excludeVerboseContent }),
3623
- ...(input.fieldLogLevel != null && { fieldLogLevel: input.fieldLogLevel }),
3624
- };
3625
- };
3626
- const se_OpenIDConnectConfig = (input, context) => {
3627
- return {
3628
- ...(input.authTTL != null && { authTTL: input.authTTL }),
3629
- ...(input.clientId != null && { clientId: input.clientId }),
3630
- ...(input.iatTTL != null && { iatTTL: input.iatTTL }),
3631
- ...(input.issuer != null && { issuer: input.issuer }),
3632
- };
3633
- };
3634
- const se_OpenSearchServiceDataSourceConfig = (input, context) => {
3635
- return {
3636
- ...(input.awsRegion != null && { awsRegion: input.awsRegion }),
3637
- ...(input.endpoint != null && { endpoint: input.endpoint }),
3638
- };
3639
- };
3640
- const se_PipelineConfig = (input, context) => {
3641
- return {
3642
- ...(input.functions != null && { functions: se_FunctionsIds(input.functions, context) }),
3643
- };
3644
- };
3645
- const se_RdsHttpEndpointConfig = (input, context) => {
3646
- return {
3647
- ...(input.awsRegion != null && { awsRegion: input.awsRegion }),
3648
- ...(input.awsSecretStoreArn != null && { awsSecretStoreArn: input.awsSecretStoreArn }),
3649
- ...(input.databaseName != null && { databaseName: input.databaseName }),
3650
- ...(input.dbClusterIdentifier != null && { dbClusterIdentifier: input.dbClusterIdentifier }),
3651
- ...(input.schema != null && { schema: input.schema }),
3652
- };
3653
- };
3654
- const se_RelationalDatabaseDataSourceConfig = (input, context) => {
3655
- return {
3656
- ...(input.rdsHttpEndpointConfig != null && {
3657
- rdsHttpEndpointConfig: se_RdsHttpEndpointConfig(input.rdsHttpEndpointConfig, context),
3658
- }),
3659
- ...(input.relationalDatabaseSourceType != null && {
3660
- relationalDatabaseSourceType: input.relationalDatabaseSourceType,
3661
- }),
3662
- };
3663
- };
3664
- const se_SyncConfig = (input, context) => {
3665
- return {
3666
- ...(input.conflictDetection != null && { conflictDetection: input.conflictDetection }),
3667
- ...(input.conflictHandler != null && { conflictHandler: input.conflictHandler }),
3668
- ...(input.lambdaConflictHandlerConfig != null && {
3669
- lambdaConflictHandlerConfig: se_LambdaConflictHandlerConfig(input.lambdaConflictHandlerConfig, context),
3670
- }),
3671
- };
3672
- };
3673
- const se_TagMap = (input, context) => {
3674
- return Object.entries(input).reduce((acc, [key, value]) => {
3675
- if (value === null) {
3676
- return acc;
3677
- }
3678
- acc[key] = value;
3679
- return acc;
3680
- }, {});
3681
- };
3682
- const se_UserPoolConfig = (input, context) => {
3683
- return {
3684
- ...(input.appIdClientRegex != null && { appIdClientRegex: input.appIdClientRegex }),
3685
- ...(input.awsRegion != null && { awsRegion: input.awsRegion }),
3686
- ...(input.defaultAction != null && { defaultAction: input.defaultAction }),
3687
- ...(input.userPoolId != null && { userPoolId: input.userPoolId }),
3688
- };
3689
- };
3690
- const de_AdditionalAuthenticationProvider = (output, context) => {
3691
- return {
3692
- authenticationType: __expectString(output.authenticationType),
3693
- lambdaAuthorizerConfig: output.lambdaAuthorizerConfig != null
3694
- ? de_LambdaAuthorizerConfig(output.lambdaAuthorizerConfig, context)
3695
- : undefined,
3696
- openIDConnectConfig: output.openIDConnectConfig != null ? de_OpenIDConnectConfig(output.openIDConnectConfig, context) : undefined,
3697
- userPoolConfig: output.userPoolConfig != null ? de_CognitoUserPoolConfig(output.userPoolConfig, context) : undefined,
3698
- };
3699
- };
3700
- const de_AdditionalAuthenticationProviders = (output, context) => {
3701
- const retVal = (output || [])
3702
- .filter((e) => e != null)
3703
- .map((entry) => {
3704
- if (entry === null) {
3705
- return null;
3706
- }
3707
- return de_AdditionalAuthenticationProvider(entry, context);
3708
- });
3709
- return retVal;
3710
- };
3711
- const de_ApiAssociation = (output, context) => {
3712
- return {
3713
- apiId: __expectString(output.apiId),
3714
- associationStatus: __expectString(output.associationStatus),
3715
- deploymentDetail: __expectString(output.deploymentDetail),
3716
- domainName: __expectString(output.domainName),
3717
- };
3718
- };
3719
- const de_ApiCache = (output, context) => {
3720
- return {
3721
- apiCachingBehavior: __expectString(output.apiCachingBehavior),
3722
- atRestEncryptionEnabled: __expectBoolean(output.atRestEncryptionEnabled),
3723
- status: __expectString(output.status),
3724
- transitEncryptionEnabled: __expectBoolean(output.transitEncryptionEnabled),
3725
- ttl: __expectLong(output.ttl),
3726
- type: __expectString(output.type),
3727
- };
3728
- };
3729
- const de_ApiKey = (output, context) => {
3730
- return {
3731
- deletes: __expectLong(output.deletes),
3732
- description: __expectString(output.description),
3733
- expires: __expectLong(output.expires),
3734
- id: __expectString(output.id),
3735
- };
3736
- };
3737
- const de_ApiKeys = (output, context) => {
3738
- const retVal = (output || [])
3739
- .filter((e) => e != null)
3740
- .map((entry) => {
3741
- if (entry === null) {
3742
- return null;
3743
- }
3744
- return de_ApiKey(entry, context);
3745
- });
3746
- return retVal;
3747
- };
3748
- const de_AppSyncRuntime = (output, context) => {
3749
- return {
3750
- name: __expectString(output.name),
3751
- runtimeVersion: __expectString(output.runtimeVersion),
3752
- };
3753
- };
3754
- const de_AuthorizationConfig = (output, context) => {
3755
- return {
3756
- authorizationType: __expectString(output.authorizationType),
3757
- awsIamConfig: output.awsIamConfig != null ? de_AwsIamConfig(output.awsIamConfig, context) : undefined,
3758
- };
3759
- };
3760
- const de_AwsIamConfig = (output, context) => {
3761
- return {
3762
- signingRegion: __expectString(output.signingRegion),
3763
- signingServiceName: __expectString(output.signingServiceName),
3764
- };
3765
- };
3766
- const de_BadRequestDetail = (output, context) => {
3767
- return {
3768
- codeErrors: output.codeErrors != null ? de_CodeErrors(output.codeErrors, context) : undefined,
3769
- };
3770
- };
3771
- const de_CachingConfig = (output, context) => {
3772
- return {
3773
- cachingKeys: output.cachingKeys != null ? de_CachingKeys(output.cachingKeys, context) : undefined,
3774
- ttl: __expectLong(output.ttl),
3775
- };
3776
- };
3777
- const de_CachingKeys = (output, context) => {
3778
- const retVal = (output || [])
3779
- .filter((e) => e != null)
3780
- .map((entry) => {
3781
- if (entry === null) {
3782
- return null;
3783
- }
3784
- return __expectString(entry);
3785
- });
3786
- return retVal;
3787
- };
3788
- const de_CodeError = (output, context) => {
3789
- return {
3790
- errorType: __expectString(output.errorType),
3791
- location: output.location != null ? de_CodeErrorLocation(output.location, context) : undefined,
3792
- value: __expectString(output.value),
3793
- };
3794
- };
3795
- const de_CodeErrorLocation = (output, context) => {
3796
- return {
3797
- column: __expectInt32(output.column),
3798
- line: __expectInt32(output.line),
3799
- span: __expectInt32(output.span),
3800
- };
3801
- };
3802
- const de_CodeErrors = (output, context) => {
3803
- const retVal = (output || [])
3804
- .filter((e) => e != null)
3805
- .map((entry) => {
3806
- if (entry === null) {
3807
- return null;
3808
- }
3809
- return de_CodeError(entry, context);
3810
- });
3811
- return retVal;
3812
- };
3813
- const de_CognitoUserPoolConfig = (output, context) => {
3814
- return {
3815
- appIdClientRegex: __expectString(output.appIdClientRegex),
3816
- awsRegion: __expectString(output.awsRegion),
3817
- userPoolId: __expectString(output.userPoolId),
3818
- };
3819
- };
3820
- const de_DataSource = (output, context) => {
3821
- return {
3822
- dataSourceArn: __expectString(output.dataSourceArn),
3823
- description: __expectString(output.description),
3824
- dynamodbConfig: output.dynamodbConfig != null ? de_DynamodbDataSourceConfig(output.dynamodbConfig, context) : undefined,
3825
- elasticsearchConfig: output.elasticsearchConfig != null
3826
- ? de_ElasticsearchDataSourceConfig(output.elasticsearchConfig, context)
3827
- : undefined,
3828
- eventBridgeConfig: output.eventBridgeConfig != null ? de_EventBridgeDataSourceConfig(output.eventBridgeConfig, context) : undefined,
3829
- httpConfig: output.httpConfig != null ? de_HttpDataSourceConfig(output.httpConfig, context) : undefined,
3830
- lambdaConfig: output.lambdaConfig != null ? de_LambdaDataSourceConfig(output.lambdaConfig, context) : undefined,
3831
- name: __expectString(output.name),
3832
- openSearchServiceConfig: output.openSearchServiceConfig != null
3833
- ? de_OpenSearchServiceDataSourceConfig(output.openSearchServiceConfig, context)
3834
- : undefined,
3835
- relationalDatabaseConfig: output.relationalDatabaseConfig != null
3836
- ? de_RelationalDatabaseDataSourceConfig(output.relationalDatabaseConfig, context)
3837
- : undefined,
3838
- serviceRoleArn: __expectString(output.serviceRoleArn),
3839
- type: __expectString(output.type),
3840
- };
3841
- };
3842
- const de_DataSources = (output, context) => {
3843
- const retVal = (output || [])
3844
- .filter((e) => e != null)
3845
- .map((entry) => {
3846
- if (entry === null) {
3847
- return null;
3848
- }
3849
- return de_DataSource(entry, context);
3850
- });
3851
- return retVal;
3852
- };
3853
- const de_DeltaSyncConfig = (output, context) => {
3854
- return {
3855
- baseTableTTL: __expectLong(output.baseTableTTL),
3856
- deltaSyncTableName: __expectString(output.deltaSyncTableName),
3857
- deltaSyncTableTTL: __expectLong(output.deltaSyncTableTTL),
3858
- };
3859
- };
3860
- const de_DomainNameConfig = (output, context) => {
3861
- return {
3862
- appsyncDomainName: __expectString(output.appsyncDomainName),
3863
- certificateArn: __expectString(output.certificateArn),
3864
- description: __expectString(output.description),
3865
- domainName: __expectString(output.domainName),
3866
- hostedZoneId: __expectString(output.hostedZoneId),
3867
- };
3868
- };
3869
- const de_DomainNameConfigs = (output, context) => {
3870
- const retVal = (output || [])
3871
- .filter((e) => e != null)
3872
- .map((entry) => {
3873
- if (entry === null) {
3874
- return null;
3875
- }
3876
- return de_DomainNameConfig(entry, context);
3877
- });
3878
- return retVal;
3879
- };
3880
- const de_DynamodbDataSourceConfig = (output, context) => {
3881
- return {
3882
- awsRegion: __expectString(output.awsRegion),
3883
- deltaSyncConfig: output.deltaSyncConfig != null ? de_DeltaSyncConfig(output.deltaSyncConfig, context) : undefined,
3884
- tableName: __expectString(output.tableName),
3885
- useCallerCredentials: __expectBoolean(output.useCallerCredentials),
3886
- versioned: __expectBoolean(output.versioned),
3887
- };
3888
- };
3889
- const de_ElasticsearchDataSourceConfig = (output, context) => {
3890
- return {
3891
- awsRegion: __expectString(output.awsRegion),
3892
- endpoint: __expectString(output.endpoint),
3893
- };
3894
- };
3895
- const de_ErrorDetail = (output, context) => {
3896
- return {
3897
- message: __expectString(output.message),
3898
- };
3899
- };
3900
- const de_EvaluateCodeErrorDetail = (output, context) => {
3901
- return {
3902
- codeErrors: output.codeErrors != null ? de_CodeErrors(output.codeErrors, context) : undefined,
3903
- message: __expectString(output.message),
3904
- };
3905
- };
3906
- const de_EventBridgeDataSourceConfig = (output, context) => {
3907
- return {
3908
- eventBusArn: __expectString(output.eventBusArn),
3909
- };
3910
- };
3911
- const de_FunctionConfiguration = (output, context) => {
3912
- return {
3913
- code: __expectString(output.code),
3914
- dataSourceName: __expectString(output.dataSourceName),
3915
- description: __expectString(output.description),
3916
- functionArn: __expectString(output.functionArn),
3917
- functionId: __expectString(output.functionId),
3918
- functionVersion: __expectString(output.functionVersion),
3919
- maxBatchSize: __expectInt32(output.maxBatchSize),
3920
- name: __expectString(output.name),
3921
- requestMappingTemplate: __expectString(output.requestMappingTemplate),
3922
- responseMappingTemplate: __expectString(output.responseMappingTemplate),
3923
- runtime: output.runtime != null ? de_AppSyncRuntime(output.runtime, context) : undefined,
3924
- syncConfig: output.syncConfig != null ? de_SyncConfig(output.syncConfig, context) : undefined,
3925
- };
3926
- };
3927
- const de_Functions = (output, context) => {
3928
- const retVal = (output || [])
3929
- .filter((e) => e != null)
3930
- .map((entry) => {
3931
- if (entry === null) {
3932
- return null;
3933
- }
3934
- return de_FunctionConfiguration(entry, context);
3935
- });
3936
- return retVal;
3937
- };
3938
- const de_FunctionsIds = (output, context) => {
3939
- const retVal = (output || [])
3940
- .filter((e) => e != null)
3941
- .map((entry) => {
3942
- if (entry === null) {
3943
- return null;
3944
- }
3945
- return __expectString(entry);
3946
- });
3947
- return retVal;
3948
- };
3949
- const de_GraphqlApi = (output, context) => {
3950
- return {
3951
- additionalAuthenticationProviders: output.additionalAuthenticationProviders != null
3952
- ? de_AdditionalAuthenticationProviders(output.additionalAuthenticationProviders, context)
3953
- : undefined,
3954
- apiId: __expectString(output.apiId),
3955
- arn: __expectString(output.arn),
3956
- authenticationType: __expectString(output.authenticationType),
3957
- lambdaAuthorizerConfig: output.lambdaAuthorizerConfig != null
3958
- ? de_LambdaAuthorizerConfig(output.lambdaAuthorizerConfig, context)
3959
- : undefined,
3960
- logConfig: output.logConfig != null ? de_LogConfig(output.logConfig, context) : undefined,
3961
- name: __expectString(output.name),
3962
- openIDConnectConfig: output.openIDConnectConfig != null ? de_OpenIDConnectConfig(output.openIDConnectConfig, context) : undefined,
3963
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
3964
- uris: output.uris != null ? de_MapOfStringToString(output.uris, context) : undefined,
3965
- userPoolConfig: output.userPoolConfig != null ? de_UserPoolConfig(output.userPoolConfig, context) : undefined,
3966
- wafWebAclArn: __expectString(output.wafWebAclArn),
3967
- xrayEnabled: __expectBoolean(output.xrayEnabled),
3968
- };
3969
- };
3970
- const de_GraphqlApis = (output, context) => {
3971
- const retVal = (output || [])
3972
- .filter((e) => e != null)
3973
- .map((entry) => {
3974
- if (entry === null) {
3975
- return null;
3976
- }
3977
- return de_GraphqlApi(entry, context);
3978
- });
3979
- return retVal;
3980
- };
3981
- const de_HttpDataSourceConfig = (output, context) => {
3982
- return {
3983
- authorizationConfig: output.authorizationConfig != null ? de_AuthorizationConfig(output.authorizationConfig, context) : undefined,
3984
- endpoint: __expectString(output.endpoint),
3985
- };
3986
- };
3987
- const de_LambdaAuthorizerConfig = (output, context) => {
3988
- return {
3989
- authorizerResultTtlInSeconds: __expectInt32(output.authorizerResultTtlInSeconds),
3990
- authorizerUri: __expectString(output.authorizerUri),
3991
- identityValidationExpression: __expectString(output.identityValidationExpression),
3992
- };
3993
- };
3994
- const de_LambdaConflictHandlerConfig = (output, context) => {
3995
- return {
3996
- lambdaConflictHandlerArn: __expectString(output.lambdaConflictHandlerArn),
3997
- };
3998
- };
3999
- const de_LambdaDataSourceConfig = (output, context) => {
4000
- return {
4001
- lambdaFunctionArn: __expectString(output.lambdaFunctionArn),
4002
- };
4003
- };
4004
- const de_LogConfig = (output, context) => {
4005
- return {
4006
- cloudWatchLogsRoleArn: __expectString(output.cloudWatchLogsRoleArn),
4007
- excludeVerboseContent: __expectBoolean(output.excludeVerboseContent),
4008
- fieldLogLevel: __expectString(output.fieldLogLevel),
4009
- };
4010
- };
4011
- const de_Logs = (output, context) => {
4012
- const retVal = (output || [])
4013
- .filter((e) => e != null)
4014
- .map((entry) => {
4015
- if (entry === null) {
4016
- return null;
4017
- }
4018
- return __expectString(entry);
4019
- });
4020
- return retVal;
4021
- };
4022
- const de_MapOfStringToString = (output, context) => {
4023
- return Object.entries(output).reduce((acc, [key, value]) => {
4024
- if (value === null) {
4025
- return acc;
4026
- }
4027
- acc[key] = __expectString(value);
4028
- return acc;
4029
- }, {});
4030
- };
4031
- const de_OpenIDConnectConfig = (output, context) => {
4032
- return {
4033
- authTTL: __expectLong(output.authTTL),
4034
- clientId: __expectString(output.clientId),
4035
- iatTTL: __expectLong(output.iatTTL),
4036
- issuer: __expectString(output.issuer),
4037
- };
4038
- };
4039
- const de_OpenSearchServiceDataSourceConfig = (output, context) => {
4040
- return {
4041
- awsRegion: __expectString(output.awsRegion),
4042
- endpoint: __expectString(output.endpoint),
4043
- };
4044
- };
4045
- const de_PipelineConfig = (output, context) => {
4046
- return {
4047
- functions: output.functions != null ? de_FunctionsIds(output.functions, context) : undefined,
4048
- };
4049
- };
4050
- const de_RdsHttpEndpointConfig = (output, context) => {
4051
- return {
4052
- awsRegion: __expectString(output.awsRegion),
4053
- awsSecretStoreArn: __expectString(output.awsSecretStoreArn),
4054
- databaseName: __expectString(output.databaseName),
4055
- dbClusterIdentifier: __expectString(output.dbClusterIdentifier),
4056
- schema: __expectString(output.schema),
4057
- };
4058
- };
4059
- const de_RelationalDatabaseDataSourceConfig = (output, context) => {
4060
- return {
4061
- rdsHttpEndpointConfig: output.rdsHttpEndpointConfig != null
4062
- ? de_RdsHttpEndpointConfig(output.rdsHttpEndpointConfig, context)
4063
- : undefined,
4064
- relationalDatabaseSourceType: __expectString(output.relationalDatabaseSourceType),
4065
- };
4066
- };
4067
- const de_Resolver = (output, context) => {
4068
- return {
4069
- cachingConfig: output.cachingConfig != null ? de_CachingConfig(output.cachingConfig, context) : undefined,
4070
- code: __expectString(output.code),
4071
- dataSourceName: __expectString(output.dataSourceName),
4072
- fieldName: __expectString(output.fieldName),
4073
- kind: __expectString(output.kind),
4074
- maxBatchSize: __expectInt32(output.maxBatchSize),
4075
- pipelineConfig: output.pipelineConfig != null ? de_PipelineConfig(output.pipelineConfig, context) : undefined,
4076
- requestMappingTemplate: __expectString(output.requestMappingTemplate),
4077
- resolverArn: __expectString(output.resolverArn),
4078
- responseMappingTemplate: __expectString(output.responseMappingTemplate),
4079
- runtime: output.runtime != null ? de_AppSyncRuntime(output.runtime, context) : undefined,
4080
- syncConfig: output.syncConfig != null ? de_SyncConfig(output.syncConfig, context) : undefined,
4081
- typeName: __expectString(output.typeName),
4082
- };
4083
- };
4084
- const de_Resolvers = (output, context) => {
4085
- const retVal = (output || [])
4086
- .filter((e) => e != null)
4087
- .map((entry) => {
4088
- if (entry === null) {
4089
- return null;
4090
- }
4091
- return de_Resolver(entry, context);
4092
- });
4093
- return retVal;
4094
- };
4095
- const de_SyncConfig = (output, context) => {
4096
- return {
4097
- conflictDetection: __expectString(output.conflictDetection),
4098
- conflictHandler: __expectString(output.conflictHandler),
4099
- lambdaConflictHandlerConfig: output.lambdaConflictHandlerConfig != null
4100
- ? de_LambdaConflictHandlerConfig(output.lambdaConflictHandlerConfig, context)
4101
- : undefined,
4102
- };
4103
- };
4104
- const de_TagMap = (output, context) => {
4105
- return Object.entries(output).reduce((acc, [key, value]) => {
4106
- if (value === null) {
4107
- return acc;
4108
- }
4109
- acc[key] = __expectString(value);
4110
- return acc;
4111
- }, {});
4112
- };
4113
- const de_Type = (output, context) => {
4114
- return {
4115
- arn: __expectString(output.arn),
4116
- definition: __expectString(output.definition),
4117
- description: __expectString(output.description),
4118
- format: __expectString(output.format),
4119
- name: __expectString(output.name),
4120
- };
4121
- };
4122
- const de_TypeList = (output, context) => {
4123
- const retVal = (output || [])
4124
- .filter((e) => e != null)
4125
- .map((entry) => {
4126
- if (entry === null) {
4127
- return null;
4128
- }
4129
- return de_Type(entry, context);
4130
- });
4131
- return retVal;
4132
- };
4133
- const de_UserPoolConfig = (output, context) => {
4134
- return {
4135
- appIdClientRegex: __expectString(output.appIdClientRegex),
4136
- awsRegion: __expectString(output.awsRegion),
4137
- defaultAction: __expectString(output.defaultAction),
4138
- userPoolId: __expectString(output.userPoolId),
4139
- };
4140
- };
4141
3439
  const deserializeMetadata = (output) => ({
4142
3440
  httpStatusCode: output.statusCode,
4143
3441
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],