@aws-sdk/client-amplify 3.118.1 → 3.128.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.
@@ -14,41 +14,31 @@ const serializeAws_restJson1CreateAppCommand = async (input, context) => {
14
14
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/apps";
15
15
  let body;
16
16
  body = JSON.stringify({
17
- ...(input.accessToken !== undefined && input.accessToken !== null && { accessToken: input.accessToken }),
18
- ...(input.autoBranchCreationConfig !== undefined &&
19
- input.autoBranchCreationConfig !== null && {
17
+ ...(input.accessToken != null && { accessToken: input.accessToken }),
18
+ ...(input.autoBranchCreationConfig != null && {
20
19
  autoBranchCreationConfig: serializeAws_restJson1AutoBranchCreationConfig(input.autoBranchCreationConfig, context),
21
20
  }),
22
- ...(input.autoBranchCreationPatterns !== undefined &&
23
- input.autoBranchCreationPatterns !== null && {
21
+ ...(input.autoBranchCreationPatterns != null && {
24
22
  autoBranchCreationPatterns: serializeAws_restJson1AutoBranchCreationPatterns(input.autoBranchCreationPatterns, context),
25
23
  }),
26
- ...(input.basicAuthCredentials !== undefined &&
27
- input.basicAuthCredentials !== null && { basicAuthCredentials: input.basicAuthCredentials }),
28
- ...(input.buildSpec !== undefined && input.buildSpec !== null && { buildSpec: input.buildSpec }),
29
- ...(input.customHeaders !== undefined && input.customHeaders !== null && { customHeaders: input.customHeaders }),
30
- ...(input.customRules !== undefined &&
31
- input.customRules !== null && { customRules: serializeAws_restJson1CustomRules(input.customRules, context) }),
32
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
33
- ...(input.enableAutoBranchCreation !== undefined &&
34
- input.enableAutoBranchCreation !== null && { enableAutoBranchCreation: input.enableAutoBranchCreation }),
35
- ...(input.enableBasicAuth !== undefined &&
36
- input.enableBasicAuth !== null && { enableBasicAuth: input.enableBasicAuth }),
37
- ...(input.enableBranchAutoBuild !== undefined &&
38
- input.enableBranchAutoBuild !== null && { enableBranchAutoBuild: input.enableBranchAutoBuild }),
39
- ...(input.enableBranchAutoDeletion !== undefined &&
40
- input.enableBranchAutoDeletion !== null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }),
41
- ...(input.environmentVariables !== undefined &&
42
- input.environmentVariables !== null && {
24
+ ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
25
+ ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
26
+ ...(input.customHeaders != null && { customHeaders: input.customHeaders }),
27
+ ...(input.customRules != null && { customRules: serializeAws_restJson1CustomRules(input.customRules, context) }),
28
+ ...(input.description != null && { description: input.description }),
29
+ ...(input.enableAutoBranchCreation != null && { enableAutoBranchCreation: input.enableAutoBranchCreation }),
30
+ ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
31
+ ...(input.enableBranchAutoBuild != null && { enableBranchAutoBuild: input.enableBranchAutoBuild }),
32
+ ...(input.enableBranchAutoDeletion != null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }),
33
+ ...(input.environmentVariables != null && {
43
34
  environmentVariables: serializeAws_restJson1EnvironmentVariables(input.environmentVariables, context),
44
35
  }),
45
- ...(input.iamServiceRoleArn !== undefined &&
46
- input.iamServiceRoleArn !== null && { iamServiceRoleArn: input.iamServiceRoleArn }),
47
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
48
- ...(input.oauthToken !== undefined && input.oauthToken !== null && { oauthToken: input.oauthToken }),
49
- ...(input.platform !== undefined && input.platform !== null && { platform: input.platform }),
50
- ...(input.repository !== undefined && input.repository !== null && { repository: input.repository }),
51
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
36
+ ...(input.iamServiceRoleArn != null && { iamServiceRoleArn: input.iamServiceRoleArn }),
37
+ ...(input.name != null && { name: input.name }),
38
+ ...(input.oauthToken != null && { oauthToken: input.oauthToken }),
39
+ ...(input.platform != null && { platform: input.platform }),
40
+ ...(input.repository != null && { repository: input.repository }),
41
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
52
42
  });
53
43
  return new protocol_http_1.HttpRequest({
54
44
  protocol,
@@ -79,11 +69,9 @@ const serializeAws_restJson1CreateBackendEnvironmentCommand = async (input, cont
79
69
  }
80
70
  let body;
81
71
  body = JSON.stringify({
82
- ...(input.deploymentArtifacts !== undefined &&
83
- input.deploymentArtifacts !== null && { deploymentArtifacts: input.deploymentArtifacts }),
84
- ...(input.environmentName !== undefined &&
85
- input.environmentName !== null && { environmentName: input.environmentName }),
86
- ...(input.stackName !== undefined && input.stackName !== null && { stackName: input.stackName }),
72
+ ...(input.deploymentArtifacts != null && { deploymentArtifacts: input.deploymentArtifacts }),
73
+ ...(input.environmentName != null && { environmentName: input.environmentName }),
74
+ ...(input.stackName != null && { stackName: input.stackName }),
87
75
  });
88
76
  return new protocol_http_1.HttpRequest({
89
77
  protocol,
@@ -114,34 +102,25 @@ const serializeAws_restJson1CreateBranchCommand = async (input, context) => {
114
102
  }
115
103
  let body;
116
104
  body = JSON.stringify({
117
- ...(input.backendEnvironmentArn !== undefined &&
118
- input.backendEnvironmentArn !== null && { backendEnvironmentArn: input.backendEnvironmentArn }),
119
- ...(input.basicAuthCredentials !== undefined &&
120
- input.basicAuthCredentials !== null && { basicAuthCredentials: input.basicAuthCredentials }),
121
- ...(input.branchName !== undefined && input.branchName !== null && { branchName: input.branchName }),
122
- ...(input.buildSpec !== undefined && input.buildSpec !== null && { buildSpec: input.buildSpec }),
123
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
124
- ...(input.displayName !== undefined && input.displayName !== null && { displayName: input.displayName }),
125
- ...(input.enableAutoBuild !== undefined &&
126
- input.enableAutoBuild !== null && { enableAutoBuild: input.enableAutoBuild }),
127
- ...(input.enableBasicAuth !== undefined &&
128
- input.enableBasicAuth !== null && { enableBasicAuth: input.enableBasicAuth }),
129
- ...(input.enableNotification !== undefined &&
130
- input.enableNotification !== null && { enableNotification: input.enableNotification }),
131
- ...(input.enablePerformanceMode !== undefined &&
132
- input.enablePerformanceMode !== null && { enablePerformanceMode: input.enablePerformanceMode }),
133
- ...(input.enablePullRequestPreview !== undefined &&
134
- input.enablePullRequestPreview !== null && { enablePullRequestPreview: input.enablePullRequestPreview }),
135
- ...(input.environmentVariables !== undefined &&
136
- input.environmentVariables !== null && {
105
+ ...(input.backendEnvironmentArn != null && { backendEnvironmentArn: input.backendEnvironmentArn }),
106
+ ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
107
+ ...(input.branchName != null && { branchName: input.branchName }),
108
+ ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
109
+ ...(input.description != null && { description: input.description }),
110
+ ...(input.displayName != null && { displayName: input.displayName }),
111
+ ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }),
112
+ ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
113
+ ...(input.enableNotification != null && { enableNotification: input.enableNotification }),
114
+ ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }),
115
+ ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }),
116
+ ...(input.environmentVariables != null && {
137
117
  environmentVariables: serializeAws_restJson1EnvironmentVariables(input.environmentVariables, context),
138
118
  }),
139
- ...(input.framework !== undefined && input.framework !== null && { framework: input.framework }),
140
- ...(input.pullRequestEnvironmentName !== undefined &&
141
- input.pullRequestEnvironmentName !== null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
142
- ...(input.stage !== undefined && input.stage !== null && { stage: input.stage }),
143
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
144
- ...(input.ttl !== undefined && input.ttl !== null && { ttl: input.ttl }),
119
+ ...(input.framework != null && { framework: input.framework }),
120
+ ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
121
+ ...(input.stage != null && { stage: input.stage }),
122
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
123
+ ...(input.ttl != null && { ttl: input.ttl }),
145
124
  });
146
125
  return new protocol_http_1.HttpRequest({
147
126
  protocol,
@@ -183,8 +162,7 @@ const serializeAws_restJson1CreateDeploymentCommand = async (input, context) =>
183
162
  }
184
163
  let body;
185
164
  body = JSON.stringify({
186
- ...(input.fileMap !== undefined &&
187
- input.fileMap !== null && { fileMap: serializeAws_restJson1FileMap(input.fileMap, context) }),
165
+ ...(input.fileMap != null && { fileMap: serializeAws_restJson1FileMap(input.fileMap, context) }),
188
166
  });
189
167
  return new protocol_http_1.HttpRequest({
190
168
  protocol,
@@ -215,17 +193,13 @@ const serializeAws_restJson1CreateDomainAssociationCommand = async (input, conte
215
193
  }
216
194
  let body;
217
195
  body = JSON.stringify({
218
- ...(input.autoSubDomainCreationPatterns !== undefined &&
219
- input.autoSubDomainCreationPatterns !== null && {
196
+ ...(input.autoSubDomainCreationPatterns != null && {
220
197
  autoSubDomainCreationPatterns: serializeAws_restJson1AutoSubDomainCreationPatterns(input.autoSubDomainCreationPatterns, context),
221
198
  }),
222
- ...(input.autoSubDomainIAMRole !== undefined &&
223
- input.autoSubDomainIAMRole !== null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }),
224
- ...(input.domainName !== undefined && input.domainName !== null && { domainName: input.domainName }),
225
- ...(input.enableAutoSubDomain !== undefined &&
226
- input.enableAutoSubDomain !== null && { enableAutoSubDomain: input.enableAutoSubDomain }),
227
- ...(input.subDomainSettings !== undefined &&
228
- input.subDomainSettings !== null && {
199
+ ...(input.autoSubDomainIAMRole != null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }),
200
+ ...(input.domainName != null && { domainName: input.domainName }),
201
+ ...(input.enableAutoSubDomain != null && { enableAutoSubDomain: input.enableAutoSubDomain }),
202
+ ...(input.subDomainSettings != null && {
229
203
  subDomainSettings: serializeAws_restJson1SubDomainSettings(input.subDomainSettings, context),
230
204
  }),
231
205
  });
@@ -258,8 +232,8 @@ const serializeAws_restJson1CreateWebhookCommand = async (input, context) => {
258
232
  }
259
233
  let body;
260
234
  body = JSON.stringify({
261
- ...(input.branchName !== undefined && input.branchName !== null && { branchName: input.branchName }),
262
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
235
+ ...(input.branchName != null && { branchName: input.branchName }),
236
+ ...(input.description != null && { description: input.description }),
263
237
  });
264
238
  return new protocol_http_1.HttpRequest({
265
239
  protocol,
@@ -498,11 +472,9 @@ const serializeAws_restJson1GenerateAccessLogsCommand = async (input, context) =
498
472
  }
499
473
  let body;
500
474
  body = JSON.stringify({
501
- ...(input.domainName !== undefined && input.domainName !== null && { domainName: input.domainName }),
502
- ...(input.endTime !== undefined &&
503
- input.endTime !== null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
504
- ...(input.startTime !== undefined &&
505
- input.startTime !== null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
475
+ ...(input.domainName != null && { domainName: input.domainName }),
476
+ ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
477
+ ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
506
478
  });
507
479
  return new protocol_http_1.HttpRequest({
508
480
  protocol,
@@ -1043,8 +1015,8 @@ const serializeAws_restJson1StartDeploymentCommand = async (input, context) => {
1043
1015
  }
1044
1016
  let body;
1045
1017
  body = JSON.stringify({
1046
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
1047
- ...(input.sourceUrl !== undefined && input.sourceUrl !== null && { sourceUrl: input.sourceUrl }),
1018
+ ...(input.jobId != null && { jobId: input.jobId }),
1019
+ ...(input.sourceUrl != null && { sourceUrl: input.sourceUrl }),
1048
1020
  });
1049
1021
  return new protocol_http_1.HttpRequest({
1050
1022
  protocol,
@@ -1085,13 +1057,12 @@ const serializeAws_restJson1StartJobCommand = async (input, context) => {
1085
1057
  }
1086
1058
  let body;
1087
1059
  body = JSON.stringify({
1088
- ...(input.commitId !== undefined && input.commitId !== null && { commitId: input.commitId }),
1089
- ...(input.commitMessage !== undefined && input.commitMessage !== null && { commitMessage: input.commitMessage }),
1090
- ...(input.commitTime !== undefined &&
1091
- input.commitTime !== null && { commitTime: Math.round(input.commitTime.getTime() / 1000) }),
1092
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
1093
- ...(input.jobReason !== undefined && input.jobReason !== null && { jobReason: input.jobReason }),
1094
- ...(input.jobType !== undefined && input.jobType !== null && { jobType: input.jobType }),
1060
+ ...(input.commitId != null && { commitId: input.commitId }),
1061
+ ...(input.commitMessage != null && { commitMessage: input.commitMessage }),
1062
+ ...(input.commitTime != null && { commitTime: Math.round(input.commitTime.getTime() / 1000) }),
1063
+ ...(input.jobId != null && { jobId: input.jobId }),
1064
+ ...(input.jobReason != null && { jobReason: input.jobReason }),
1065
+ ...(input.jobType != null && { jobType: input.jobType }),
1095
1066
  });
1096
1067
  return new protocol_http_1.HttpRequest({
1097
1068
  protocol,
@@ -1169,7 +1140,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1169
1140
  }
1170
1141
  let body;
1171
1142
  body = JSON.stringify({
1172
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
1143
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
1173
1144
  });
1174
1145
  return new protocol_http_1.HttpRequest({
1175
1146
  protocol,
@@ -1230,40 +1201,30 @@ const serializeAws_restJson1UpdateAppCommand = async (input, context) => {
1230
1201
  }
1231
1202
  let body;
1232
1203
  body = JSON.stringify({
1233
- ...(input.accessToken !== undefined && input.accessToken !== null && { accessToken: input.accessToken }),
1234
- ...(input.autoBranchCreationConfig !== undefined &&
1235
- input.autoBranchCreationConfig !== null && {
1204
+ ...(input.accessToken != null && { accessToken: input.accessToken }),
1205
+ ...(input.autoBranchCreationConfig != null && {
1236
1206
  autoBranchCreationConfig: serializeAws_restJson1AutoBranchCreationConfig(input.autoBranchCreationConfig, context),
1237
1207
  }),
1238
- ...(input.autoBranchCreationPatterns !== undefined &&
1239
- input.autoBranchCreationPatterns !== null && {
1208
+ ...(input.autoBranchCreationPatterns != null && {
1240
1209
  autoBranchCreationPatterns: serializeAws_restJson1AutoBranchCreationPatterns(input.autoBranchCreationPatterns, context),
1241
1210
  }),
1242
- ...(input.basicAuthCredentials !== undefined &&
1243
- input.basicAuthCredentials !== null && { basicAuthCredentials: input.basicAuthCredentials }),
1244
- ...(input.buildSpec !== undefined && input.buildSpec !== null && { buildSpec: input.buildSpec }),
1245
- ...(input.customHeaders !== undefined && input.customHeaders !== null && { customHeaders: input.customHeaders }),
1246
- ...(input.customRules !== undefined &&
1247
- input.customRules !== null && { customRules: serializeAws_restJson1CustomRules(input.customRules, context) }),
1248
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
1249
- ...(input.enableAutoBranchCreation !== undefined &&
1250
- input.enableAutoBranchCreation !== null && { enableAutoBranchCreation: input.enableAutoBranchCreation }),
1251
- ...(input.enableBasicAuth !== undefined &&
1252
- input.enableBasicAuth !== null && { enableBasicAuth: input.enableBasicAuth }),
1253
- ...(input.enableBranchAutoBuild !== undefined &&
1254
- input.enableBranchAutoBuild !== null && { enableBranchAutoBuild: input.enableBranchAutoBuild }),
1255
- ...(input.enableBranchAutoDeletion !== undefined &&
1256
- input.enableBranchAutoDeletion !== null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }),
1257
- ...(input.environmentVariables !== undefined &&
1258
- input.environmentVariables !== null && {
1211
+ ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
1212
+ ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
1213
+ ...(input.customHeaders != null && { customHeaders: input.customHeaders }),
1214
+ ...(input.customRules != null && { customRules: serializeAws_restJson1CustomRules(input.customRules, context) }),
1215
+ ...(input.description != null && { description: input.description }),
1216
+ ...(input.enableAutoBranchCreation != null && { enableAutoBranchCreation: input.enableAutoBranchCreation }),
1217
+ ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
1218
+ ...(input.enableBranchAutoBuild != null && { enableBranchAutoBuild: input.enableBranchAutoBuild }),
1219
+ ...(input.enableBranchAutoDeletion != null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }),
1220
+ ...(input.environmentVariables != null && {
1259
1221
  environmentVariables: serializeAws_restJson1EnvironmentVariables(input.environmentVariables, context),
1260
1222
  }),
1261
- ...(input.iamServiceRoleArn !== undefined &&
1262
- input.iamServiceRoleArn !== null && { iamServiceRoleArn: input.iamServiceRoleArn }),
1263
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
1264
- ...(input.oauthToken !== undefined && input.oauthToken !== null && { oauthToken: input.oauthToken }),
1265
- ...(input.platform !== undefined && input.platform !== null && { platform: input.platform }),
1266
- ...(input.repository !== undefined && input.repository !== null && { repository: input.repository }),
1223
+ ...(input.iamServiceRoleArn != null && { iamServiceRoleArn: input.iamServiceRoleArn }),
1224
+ ...(input.name != null && { name: input.name }),
1225
+ ...(input.oauthToken != null && { oauthToken: input.oauthToken }),
1226
+ ...(input.platform != null && { platform: input.platform }),
1227
+ ...(input.repository != null && { repository: input.repository }),
1267
1228
  });
1268
1229
  return new protocol_http_1.HttpRequest({
1269
1230
  protocol,
@@ -1304,32 +1265,23 @@ const serializeAws_restJson1UpdateBranchCommand = async (input, context) => {
1304
1265
  }
1305
1266
  let body;
1306
1267
  body = JSON.stringify({
1307
- ...(input.backendEnvironmentArn !== undefined &&
1308
- input.backendEnvironmentArn !== null && { backendEnvironmentArn: input.backendEnvironmentArn }),
1309
- ...(input.basicAuthCredentials !== undefined &&
1310
- input.basicAuthCredentials !== null && { basicAuthCredentials: input.basicAuthCredentials }),
1311
- ...(input.buildSpec !== undefined && input.buildSpec !== null && { buildSpec: input.buildSpec }),
1312
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
1313
- ...(input.displayName !== undefined && input.displayName !== null && { displayName: input.displayName }),
1314
- ...(input.enableAutoBuild !== undefined &&
1315
- input.enableAutoBuild !== null && { enableAutoBuild: input.enableAutoBuild }),
1316
- ...(input.enableBasicAuth !== undefined &&
1317
- input.enableBasicAuth !== null && { enableBasicAuth: input.enableBasicAuth }),
1318
- ...(input.enableNotification !== undefined &&
1319
- input.enableNotification !== null && { enableNotification: input.enableNotification }),
1320
- ...(input.enablePerformanceMode !== undefined &&
1321
- input.enablePerformanceMode !== null && { enablePerformanceMode: input.enablePerformanceMode }),
1322
- ...(input.enablePullRequestPreview !== undefined &&
1323
- input.enablePullRequestPreview !== null && { enablePullRequestPreview: input.enablePullRequestPreview }),
1324
- ...(input.environmentVariables !== undefined &&
1325
- input.environmentVariables !== null && {
1268
+ ...(input.backendEnvironmentArn != null && { backendEnvironmentArn: input.backendEnvironmentArn }),
1269
+ ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
1270
+ ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
1271
+ ...(input.description != null && { description: input.description }),
1272
+ ...(input.displayName != null && { displayName: input.displayName }),
1273
+ ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }),
1274
+ ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
1275
+ ...(input.enableNotification != null && { enableNotification: input.enableNotification }),
1276
+ ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }),
1277
+ ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }),
1278
+ ...(input.environmentVariables != null && {
1326
1279
  environmentVariables: serializeAws_restJson1EnvironmentVariables(input.environmentVariables, context),
1327
1280
  }),
1328
- ...(input.framework !== undefined && input.framework !== null && { framework: input.framework }),
1329
- ...(input.pullRequestEnvironmentName !== undefined &&
1330
- input.pullRequestEnvironmentName !== null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
1331
- ...(input.stage !== undefined && input.stage !== null && { stage: input.stage }),
1332
- ...(input.ttl !== undefined && input.ttl !== null && { ttl: input.ttl }),
1281
+ ...(input.framework != null && { framework: input.framework }),
1282
+ ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
1283
+ ...(input.stage != null && { stage: input.stage }),
1284
+ ...(input.ttl != null && { ttl: input.ttl }),
1333
1285
  });
1334
1286
  return new protocol_http_1.HttpRequest({
1335
1287
  protocol,
@@ -1370,16 +1322,12 @@ const serializeAws_restJson1UpdateDomainAssociationCommand = async (input, conte
1370
1322
  }
1371
1323
  let body;
1372
1324
  body = JSON.stringify({
1373
- ...(input.autoSubDomainCreationPatterns !== undefined &&
1374
- input.autoSubDomainCreationPatterns !== null && {
1325
+ ...(input.autoSubDomainCreationPatterns != null && {
1375
1326
  autoSubDomainCreationPatterns: serializeAws_restJson1AutoSubDomainCreationPatterns(input.autoSubDomainCreationPatterns, context),
1376
1327
  }),
1377
- ...(input.autoSubDomainIAMRole !== undefined &&
1378
- input.autoSubDomainIAMRole !== null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }),
1379
- ...(input.enableAutoSubDomain !== undefined &&
1380
- input.enableAutoSubDomain !== null && { enableAutoSubDomain: input.enableAutoSubDomain }),
1381
- ...(input.subDomainSettings !== undefined &&
1382
- input.subDomainSettings !== null && {
1328
+ ...(input.autoSubDomainIAMRole != null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }),
1329
+ ...(input.enableAutoSubDomain != null && { enableAutoSubDomain: input.enableAutoSubDomain }),
1330
+ ...(input.subDomainSettings != null && {
1383
1331
  subDomainSettings: serializeAws_restJson1SubDomainSettings(input.subDomainSettings, context),
1384
1332
  }),
1385
1333
  });
@@ -1412,8 +1360,8 @@ const serializeAws_restJson1UpdateWebhookCommand = async (input, context) => {
1412
1360
  }
1413
1361
  let body;
1414
1362
  body = JSON.stringify({
1415
- ...(input.branchName !== undefined && input.branchName !== null && { branchName: input.branchName }),
1416
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
1363
+ ...(input.branchName != null && { branchName: input.branchName }),
1364
+ ...(input.description != null && { description: input.description }),
1417
1365
  });
1418
1366
  return new protocol_http_1.HttpRequest({
1419
1367
  protocol,
@@ -1447,8 +1395,7 @@ const deserializeAws_restJson1CreateAppCommandError = async (output, context) =>
1447
1395
  body: await parseBody(output.body, context),
1448
1396
  };
1449
1397
  let response;
1450
- let errorCode = "UnknownError";
1451
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1398
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1452
1399
  switch (errorCode) {
1453
1400
  case "BadRequestException":
1454
1401
  case "com.amazonaws.amplify#BadRequestException":
@@ -1467,10 +1414,12 @@ const deserializeAws_restJson1CreateAppCommandError = async (output, context) =>
1467
1414
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1468
1415
  default:
1469
1416
  const parsedBody = parsedOutput.body;
1417
+ const $metadata = deserializeMetadata(output);
1418
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1470
1419
  response = new AmplifyServiceException_1.AmplifyServiceException({
1471
- name: parsedBody.code || parsedBody.Code || errorCode,
1420
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1472
1421
  $fault: "client",
1473
- $metadata: deserializeMetadata(output),
1422
+ $metadata,
1474
1423
  });
1475
1424
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1476
1425
  }
@@ -1496,8 +1445,7 @@ const deserializeAws_restJson1CreateBackendEnvironmentCommandError = async (outp
1496
1445
  body: await parseBody(output.body, context),
1497
1446
  };
1498
1447
  let response;
1499
- let errorCode = "UnknownError";
1500
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1448
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1501
1449
  switch (errorCode) {
1502
1450
  case "BadRequestException":
1503
1451
  case "com.amazonaws.amplify#BadRequestException":
@@ -1516,10 +1464,12 @@ const deserializeAws_restJson1CreateBackendEnvironmentCommandError = async (outp
1516
1464
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1517
1465
  default:
1518
1466
  const parsedBody = parsedOutput.body;
1467
+ const $metadata = deserializeMetadata(output);
1468
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1519
1469
  response = new AmplifyServiceException_1.AmplifyServiceException({
1520
- name: parsedBody.code || parsedBody.Code || errorCode,
1470
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1521
1471
  $fault: "client",
1522
- $metadata: deserializeMetadata(output),
1472
+ $metadata,
1523
1473
  });
1524
1474
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1525
1475
  }
@@ -1545,8 +1495,7 @@ const deserializeAws_restJson1CreateBranchCommandError = async (output, context)
1545
1495
  body: await parseBody(output.body, context),
1546
1496
  };
1547
1497
  let response;
1548
- let errorCode = "UnknownError";
1549
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1498
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1550
1499
  switch (errorCode) {
1551
1500
  case "BadRequestException":
1552
1501
  case "com.amazonaws.amplify#BadRequestException":
@@ -1568,10 +1517,12 @@ const deserializeAws_restJson1CreateBranchCommandError = async (output, context)
1568
1517
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1569
1518
  default:
1570
1519
  const parsedBody = parsedOutput.body;
1520
+ const $metadata = deserializeMetadata(output);
1521
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1571
1522
  response = new AmplifyServiceException_1.AmplifyServiceException({
1572
- name: parsedBody.code || parsedBody.Code || errorCode,
1523
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1573
1524
  $fault: "client",
1574
- $metadata: deserializeMetadata(output),
1525
+ $metadata,
1575
1526
  });
1576
1527
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1577
1528
  }
@@ -1605,8 +1556,7 @@ const deserializeAws_restJson1CreateDeploymentCommandError = async (output, cont
1605
1556
  body: await parseBody(output.body, context),
1606
1557
  };
1607
1558
  let response;
1608
- let errorCode = "UnknownError";
1609
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1559
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1610
1560
  switch (errorCode) {
1611
1561
  case "BadRequestException":
1612
1562
  case "com.amazonaws.amplify#BadRequestException":
@@ -1622,10 +1572,12 @@ const deserializeAws_restJson1CreateDeploymentCommandError = async (output, cont
1622
1572
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1623
1573
  default:
1624
1574
  const parsedBody = parsedOutput.body;
1575
+ const $metadata = deserializeMetadata(output);
1576
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1625
1577
  response = new AmplifyServiceException_1.AmplifyServiceException({
1626
- name: parsedBody.code || parsedBody.Code || errorCode,
1578
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1627
1579
  $fault: "client",
1628
- $metadata: deserializeMetadata(output),
1580
+ $metadata,
1629
1581
  });
1630
1582
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1631
1583
  }
@@ -1651,8 +1603,7 @@ const deserializeAws_restJson1CreateDomainAssociationCommandError = async (outpu
1651
1603
  body: await parseBody(output.body, context),
1652
1604
  };
1653
1605
  let response;
1654
- let errorCode = "UnknownError";
1655
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1606
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1656
1607
  switch (errorCode) {
1657
1608
  case "BadRequestException":
1658
1609
  case "com.amazonaws.amplify#BadRequestException":
@@ -1674,10 +1625,12 @@ const deserializeAws_restJson1CreateDomainAssociationCommandError = async (outpu
1674
1625
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1675
1626
  default:
1676
1627
  const parsedBody = parsedOutput.body;
1628
+ const $metadata = deserializeMetadata(output);
1629
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1677
1630
  response = new AmplifyServiceException_1.AmplifyServiceException({
1678
- name: parsedBody.code || parsedBody.Code || errorCode,
1631
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1679
1632
  $fault: "client",
1680
- $metadata: deserializeMetadata(output),
1633
+ $metadata,
1681
1634
  });
1682
1635
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1683
1636
  }
@@ -1703,8 +1656,7 @@ const deserializeAws_restJson1CreateWebhookCommandError = async (output, context
1703
1656
  body: await parseBody(output.body, context),
1704
1657
  };
1705
1658
  let response;
1706
- let errorCode = "UnknownError";
1707
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1659
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1708
1660
  switch (errorCode) {
1709
1661
  case "BadRequestException":
1710
1662
  case "com.amazonaws.amplify#BadRequestException":
@@ -1726,10 +1678,12 @@ const deserializeAws_restJson1CreateWebhookCommandError = async (output, context
1726
1678
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1727
1679
  default:
1728
1680
  const parsedBody = parsedOutput.body;
1681
+ const $metadata = deserializeMetadata(output);
1682
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1729
1683
  response = new AmplifyServiceException_1.AmplifyServiceException({
1730
- name: parsedBody.code || parsedBody.Code || errorCode,
1684
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1731
1685
  $fault: "client",
1732
- $metadata: deserializeMetadata(output),
1686
+ $metadata,
1733
1687
  });
1734
1688
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1735
1689
  }
@@ -1755,8 +1709,7 @@ const deserializeAws_restJson1DeleteAppCommandError = async (output, context) =>
1755
1709
  body: await parseBody(output.body, context),
1756
1710
  };
1757
1711
  let response;
1758
- let errorCode = "UnknownError";
1759
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1712
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1760
1713
  switch (errorCode) {
1761
1714
  case "BadRequestException":
1762
1715
  case "com.amazonaws.amplify#BadRequestException":
@@ -1775,10 +1728,12 @@ const deserializeAws_restJson1DeleteAppCommandError = async (output, context) =>
1775
1728
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1776
1729
  default:
1777
1730
  const parsedBody = parsedOutput.body;
1731
+ const $metadata = deserializeMetadata(output);
1732
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1778
1733
  response = new AmplifyServiceException_1.AmplifyServiceException({
1779
- name: parsedBody.code || parsedBody.Code || errorCode,
1734
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1780
1735
  $fault: "client",
1781
- $metadata: deserializeMetadata(output),
1736
+ $metadata,
1782
1737
  });
1783
1738
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1784
1739
  }
@@ -1804,8 +1759,7 @@ const deserializeAws_restJson1DeleteBackendEnvironmentCommandError = async (outp
1804
1759
  body: await parseBody(output.body, context),
1805
1760
  };
1806
1761
  let response;
1807
- let errorCode = "UnknownError";
1808
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1762
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1809
1763
  switch (errorCode) {
1810
1764
  case "BadRequestException":
1811
1765
  case "com.amazonaws.amplify#BadRequestException":
@@ -1824,10 +1778,12 @@ const deserializeAws_restJson1DeleteBackendEnvironmentCommandError = async (outp
1824
1778
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1825
1779
  default:
1826
1780
  const parsedBody = parsedOutput.body;
1781
+ const $metadata = deserializeMetadata(output);
1782
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1827
1783
  response = new AmplifyServiceException_1.AmplifyServiceException({
1828
- name: parsedBody.code || parsedBody.Code || errorCode,
1784
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1829
1785
  $fault: "client",
1830
- $metadata: deserializeMetadata(output),
1786
+ $metadata,
1831
1787
  });
1832
1788
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1833
1789
  }
@@ -1853,8 +1809,7 @@ const deserializeAws_restJson1DeleteBranchCommandError = async (output, context)
1853
1809
  body: await parseBody(output.body, context),
1854
1810
  };
1855
1811
  let response;
1856
- let errorCode = "UnknownError";
1857
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1812
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1858
1813
  switch (errorCode) {
1859
1814
  case "BadRequestException":
1860
1815
  case "com.amazonaws.amplify#BadRequestException":
@@ -1873,10 +1828,12 @@ const deserializeAws_restJson1DeleteBranchCommandError = async (output, context)
1873
1828
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1874
1829
  default:
1875
1830
  const parsedBody = parsedOutput.body;
1831
+ const $metadata = deserializeMetadata(output);
1832
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1876
1833
  response = new AmplifyServiceException_1.AmplifyServiceException({
1877
- name: parsedBody.code || parsedBody.Code || errorCode,
1834
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1878
1835
  $fault: "client",
1879
- $metadata: deserializeMetadata(output),
1836
+ $metadata,
1880
1837
  });
1881
1838
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1882
1839
  }
@@ -1902,8 +1859,7 @@ const deserializeAws_restJson1DeleteDomainAssociationCommandError = async (outpu
1902
1859
  body: await parseBody(output.body, context),
1903
1860
  };
1904
1861
  let response;
1905
- let errorCode = "UnknownError";
1906
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1862
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1907
1863
  switch (errorCode) {
1908
1864
  case "BadRequestException":
1909
1865
  case "com.amazonaws.amplify#BadRequestException":
@@ -1922,10 +1878,12 @@ const deserializeAws_restJson1DeleteDomainAssociationCommandError = async (outpu
1922
1878
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1923
1879
  default:
1924
1880
  const parsedBody = parsedOutput.body;
1881
+ const $metadata = deserializeMetadata(output);
1882
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1925
1883
  response = new AmplifyServiceException_1.AmplifyServiceException({
1926
- name: parsedBody.code || parsedBody.Code || errorCode,
1884
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1927
1885
  $fault: "client",
1928
- $metadata: deserializeMetadata(output),
1886
+ $metadata,
1929
1887
  });
1930
1888
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1931
1889
  }
@@ -1951,8 +1909,7 @@ const deserializeAws_restJson1DeleteJobCommandError = async (output, context) =>
1951
1909
  body: await parseBody(output.body, context),
1952
1910
  };
1953
1911
  let response;
1954
- let errorCode = "UnknownError";
1955
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1912
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1956
1913
  switch (errorCode) {
1957
1914
  case "BadRequestException":
1958
1915
  case "com.amazonaws.amplify#BadRequestException":
@@ -1971,10 +1928,12 @@ const deserializeAws_restJson1DeleteJobCommandError = async (output, context) =>
1971
1928
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
1972
1929
  default:
1973
1930
  const parsedBody = parsedOutput.body;
1931
+ const $metadata = deserializeMetadata(output);
1932
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1974
1933
  response = new AmplifyServiceException_1.AmplifyServiceException({
1975
- name: parsedBody.code || parsedBody.Code || errorCode,
1934
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1976
1935
  $fault: "client",
1977
- $metadata: deserializeMetadata(output),
1936
+ $metadata,
1978
1937
  });
1979
1938
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1980
1939
  }
@@ -2000,8 +1959,7 @@ const deserializeAws_restJson1DeleteWebhookCommandError = async (output, context
2000
1959
  body: await parseBody(output.body, context),
2001
1960
  };
2002
1961
  let response;
2003
- let errorCode = "UnknownError";
2004
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1962
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2005
1963
  switch (errorCode) {
2006
1964
  case "BadRequestException":
2007
1965
  case "com.amazonaws.amplify#BadRequestException":
@@ -2020,10 +1978,12 @@ const deserializeAws_restJson1DeleteWebhookCommandError = async (output, context
2020
1978
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2021
1979
  default:
2022
1980
  const parsedBody = parsedOutput.body;
1981
+ const $metadata = deserializeMetadata(output);
1982
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2023
1983
  response = new AmplifyServiceException_1.AmplifyServiceException({
2024
- name: parsedBody.code || parsedBody.Code || errorCode,
1984
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2025
1985
  $fault: "client",
2026
- $metadata: deserializeMetadata(output),
1986
+ $metadata,
2027
1987
  });
2028
1988
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2029
1989
  }
@@ -2049,8 +2009,7 @@ const deserializeAws_restJson1GenerateAccessLogsCommandError = async (output, co
2049
2009
  body: await parseBody(output.body, context),
2050
2010
  };
2051
2011
  let response;
2052
- let errorCode = "UnknownError";
2053
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2012
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2054
2013
  switch (errorCode) {
2055
2014
  case "BadRequestException":
2056
2015
  case "com.amazonaws.amplify#BadRequestException":
@@ -2066,10 +2025,12 @@ const deserializeAws_restJson1GenerateAccessLogsCommandError = async (output, co
2066
2025
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2067
2026
  default:
2068
2027
  const parsedBody = parsedOutput.body;
2028
+ const $metadata = deserializeMetadata(output);
2029
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2069
2030
  response = new AmplifyServiceException_1.AmplifyServiceException({
2070
- name: parsedBody.code || parsedBody.Code || errorCode,
2031
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2071
2032
  $fault: "client",
2072
- $metadata: deserializeMetadata(output),
2033
+ $metadata,
2073
2034
  });
2074
2035
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2075
2036
  }
@@ -2095,8 +2056,7 @@ const deserializeAws_restJson1GetAppCommandError = async (output, context) => {
2095
2056
  body: await parseBody(output.body, context),
2096
2057
  };
2097
2058
  let response;
2098
- let errorCode = "UnknownError";
2099
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2059
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2100
2060
  switch (errorCode) {
2101
2061
  case "BadRequestException":
2102
2062
  case "com.amazonaws.amplify#BadRequestException":
@@ -2112,10 +2072,12 @@ const deserializeAws_restJson1GetAppCommandError = async (output, context) => {
2112
2072
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2113
2073
  default:
2114
2074
  const parsedBody = parsedOutput.body;
2075
+ const $metadata = deserializeMetadata(output);
2076
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2115
2077
  response = new AmplifyServiceException_1.AmplifyServiceException({
2116
- name: parsedBody.code || parsedBody.Code || errorCode,
2078
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2117
2079
  $fault: "client",
2118
- $metadata: deserializeMetadata(output),
2080
+ $metadata,
2119
2081
  });
2120
2082
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2121
2083
  }
@@ -2145,8 +2107,7 @@ const deserializeAws_restJson1GetArtifactUrlCommandError = async (output, contex
2145
2107
  body: await parseBody(output.body, context),
2146
2108
  };
2147
2109
  let response;
2148
- let errorCode = "UnknownError";
2149
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2110
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2150
2111
  switch (errorCode) {
2151
2112
  case "BadRequestException":
2152
2113
  case "com.amazonaws.amplify#BadRequestException":
@@ -2165,10 +2126,12 @@ const deserializeAws_restJson1GetArtifactUrlCommandError = async (output, contex
2165
2126
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2166
2127
  default:
2167
2128
  const parsedBody = parsedOutput.body;
2129
+ const $metadata = deserializeMetadata(output);
2130
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2168
2131
  response = new AmplifyServiceException_1.AmplifyServiceException({
2169
- name: parsedBody.code || parsedBody.Code || errorCode,
2132
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2170
2133
  $fault: "client",
2171
- $metadata: deserializeMetadata(output),
2134
+ $metadata,
2172
2135
  });
2173
2136
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2174
2137
  }
@@ -2194,8 +2157,7 @@ const deserializeAws_restJson1GetBackendEnvironmentCommandError = async (output,
2194
2157
  body: await parseBody(output.body, context),
2195
2158
  };
2196
2159
  let response;
2197
- let errorCode = "UnknownError";
2198
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2160
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2199
2161
  switch (errorCode) {
2200
2162
  case "BadRequestException":
2201
2163
  case "com.amazonaws.amplify#BadRequestException":
@@ -2211,10 +2173,12 @@ const deserializeAws_restJson1GetBackendEnvironmentCommandError = async (output,
2211
2173
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2212
2174
  default:
2213
2175
  const parsedBody = parsedOutput.body;
2176
+ const $metadata = deserializeMetadata(output);
2177
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2214
2178
  response = new AmplifyServiceException_1.AmplifyServiceException({
2215
- name: parsedBody.code || parsedBody.Code || errorCode,
2179
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2216
2180
  $fault: "client",
2217
- $metadata: deserializeMetadata(output),
2181
+ $metadata,
2218
2182
  });
2219
2183
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2220
2184
  }
@@ -2240,8 +2204,7 @@ const deserializeAws_restJson1GetBranchCommandError = async (output, context) =>
2240
2204
  body: await parseBody(output.body, context),
2241
2205
  };
2242
2206
  let response;
2243
- let errorCode = "UnknownError";
2244
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2207
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2245
2208
  switch (errorCode) {
2246
2209
  case "BadRequestException":
2247
2210
  case "com.amazonaws.amplify#BadRequestException":
@@ -2257,10 +2220,12 @@ const deserializeAws_restJson1GetBranchCommandError = async (output, context) =>
2257
2220
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2258
2221
  default:
2259
2222
  const parsedBody = parsedOutput.body;
2223
+ const $metadata = deserializeMetadata(output);
2224
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2260
2225
  response = new AmplifyServiceException_1.AmplifyServiceException({
2261
- name: parsedBody.code || parsedBody.Code || errorCode,
2226
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2262
2227
  $fault: "client",
2263
- $metadata: deserializeMetadata(output),
2228
+ $metadata,
2264
2229
  });
2265
2230
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2266
2231
  }
@@ -2286,8 +2251,7 @@ const deserializeAws_restJson1GetDomainAssociationCommandError = async (output,
2286
2251
  body: await parseBody(output.body, context),
2287
2252
  };
2288
2253
  let response;
2289
- let errorCode = "UnknownError";
2290
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2254
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2291
2255
  switch (errorCode) {
2292
2256
  case "BadRequestException":
2293
2257
  case "com.amazonaws.amplify#BadRequestException":
@@ -2303,10 +2267,12 @@ const deserializeAws_restJson1GetDomainAssociationCommandError = async (output,
2303
2267
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2304
2268
  default:
2305
2269
  const parsedBody = parsedOutput.body;
2270
+ const $metadata = deserializeMetadata(output);
2271
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2306
2272
  response = new AmplifyServiceException_1.AmplifyServiceException({
2307
- name: parsedBody.code || parsedBody.Code || errorCode,
2273
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2308
2274
  $fault: "client",
2309
- $metadata: deserializeMetadata(output),
2275
+ $metadata,
2310
2276
  });
2311
2277
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2312
2278
  }
@@ -2332,8 +2298,7 @@ const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
2332
2298
  body: await parseBody(output.body, context),
2333
2299
  };
2334
2300
  let response;
2335
- let errorCode = "UnknownError";
2336
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2301
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2337
2302
  switch (errorCode) {
2338
2303
  case "BadRequestException":
2339
2304
  case "com.amazonaws.amplify#BadRequestException":
@@ -2352,10 +2317,12 @@ const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
2352
2317
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2353
2318
  default:
2354
2319
  const parsedBody = parsedOutput.body;
2320
+ const $metadata = deserializeMetadata(output);
2321
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2355
2322
  response = new AmplifyServiceException_1.AmplifyServiceException({
2356
- name: parsedBody.code || parsedBody.Code || errorCode,
2323
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2357
2324
  $fault: "client",
2358
- $metadata: deserializeMetadata(output),
2325
+ $metadata,
2359
2326
  });
2360
2327
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2361
2328
  }
@@ -2381,8 +2348,7 @@ const deserializeAws_restJson1GetWebhookCommandError = async (output, context) =
2381
2348
  body: await parseBody(output.body, context),
2382
2349
  };
2383
2350
  let response;
2384
- let errorCode = "UnknownError";
2385
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2351
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2386
2352
  switch (errorCode) {
2387
2353
  case "BadRequestException":
2388
2354
  case "com.amazonaws.amplify#BadRequestException":
@@ -2401,10 +2367,12 @@ const deserializeAws_restJson1GetWebhookCommandError = async (output, context) =
2401
2367
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2402
2368
  default:
2403
2369
  const parsedBody = parsedOutput.body;
2370
+ const $metadata = deserializeMetadata(output);
2371
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2404
2372
  response = new AmplifyServiceException_1.AmplifyServiceException({
2405
- name: parsedBody.code || parsedBody.Code || errorCode,
2373
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2406
2374
  $fault: "client",
2407
- $metadata: deserializeMetadata(output),
2375
+ $metadata,
2408
2376
  });
2409
2377
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2410
2378
  }
@@ -2434,8 +2402,7 @@ const deserializeAws_restJson1ListAppsCommandError = async (output, context) =>
2434
2402
  body: await parseBody(output.body, context),
2435
2403
  };
2436
2404
  let response;
2437
- let errorCode = "UnknownError";
2438
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2405
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2439
2406
  switch (errorCode) {
2440
2407
  case "BadRequestException":
2441
2408
  case "com.amazonaws.amplify#BadRequestException":
@@ -2448,10 +2415,12 @@ const deserializeAws_restJson1ListAppsCommandError = async (output, context) =>
2448
2415
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2449
2416
  default:
2450
2417
  const parsedBody = parsedOutput.body;
2418
+ const $metadata = deserializeMetadata(output);
2419
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2451
2420
  response = new AmplifyServiceException_1.AmplifyServiceException({
2452
- name: parsedBody.code || parsedBody.Code || errorCode,
2421
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2453
2422
  $fault: "client",
2454
- $metadata: deserializeMetadata(output),
2423
+ $metadata,
2455
2424
  });
2456
2425
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2457
2426
  }
@@ -2481,8 +2450,7 @@ const deserializeAws_restJson1ListArtifactsCommandError = async (output, context
2481
2450
  body: await parseBody(output.body, context),
2482
2451
  };
2483
2452
  let response;
2484
- let errorCode = "UnknownError";
2485
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2453
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2486
2454
  switch (errorCode) {
2487
2455
  case "BadRequestException":
2488
2456
  case "com.amazonaws.amplify#BadRequestException":
@@ -2498,10 +2466,12 @@ const deserializeAws_restJson1ListArtifactsCommandError = async (output, context
2498
2466
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2499
2467
  default:
2500
2468
  const parsedBody = parsedOutput.body;
2469
+ const $metadata = deserializeMetadata(output);
2470
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2501
2471
  response = new AmplifyServiceException_1.AmplifyServiceException({
2502
- name: parsedBody.code || parsedBody.Code || errorCode,
2472
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2503
2473
  $fault: "client",
2504
- $metadata: deserializeMetadata(output),
2474
+ $metadata,
2505
2475
  });
2506
2476
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2507
2477
  }
@@ -2531,8 +2501,7 @@ const deserializeAws_restJson1ListBackendEnvironmentsCommandError = async (outpu
2531
2501
  body: await parseBody(output.body, context),
2532
2502
  };
2533
2503
  let response;
2534
- let errorCode = "UnknownError";
2535
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2504
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2536
2505
  switch (errorCode) {
2537
2506
  case "BadRequestException":
2538
2507
  case "com.amazonaws.amplify#BadRequestException":
@@ -2545,10 +2514,12 @@ const deserializeAws_restJson1ListBackendEnvironmentsCommandError = async (outpu
2545
2514
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2546
2515
  default:
2547
2516
  const parsedBody = parsedOutput.body;
2517
+ const $metadata = deserializeMetadata(output);
2518
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2548
2519
  response = new AmplifyServiceException_1.AmplifyServiceException({
2549
- name: parsedBody.code || parsedBody.Code || errorCode,
2520
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2550
2521
  $fault: "client",
2551
- $metadata: deserializeMetadata(output),
2522
+ $metadata,
2552
2523
  });
2553
2524
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2554
2525
  }
@@ -2578,8 +2549,7 @@ const deserializeAws_restJson1ListBranchesCommandError = async (output, context)
2578
2549
  body: await parseBody(output.body, context),
2579
2550
  };
2580
2551
  let response;
2581
- let errorCode = "UnknownError";
2582
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2552
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2583
2553
  switch (errorCode) {
2584
2554
  case "BadRequestException":
2585
2555
  case "com.amazonaws.amplify#BadRequestException":
@@ -2592,10 +2562,12 @@ const deserializeAws_restJson1ListBranchesCommandError = async (output, context)
2592
2562
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2593
2563
  default:
2594
2564
  const parsedBody = parsedOutput.body;
2565
+ const $metadata = deserializeMetadata(output);
2566
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2595
2567
  response = new AmplifyServiceException_1.AmplifyServiceException({
2596
- name: parsedBody.code || parsedBody.Code || errorCode,
2568
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2597
2569
  $fault: "client",
2598
- $metadata: deserializeMetadata(output),
2570
+ $metadata,
2599
2571
  });
2600
2572
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2601
2573
  }
@@ -2625,8 +2597,7 @@ const deserializeAws_restJson1ListDomainAssociationsCommandError = async (output
2625
2597
  body: await parseBody(output.body, context),
2626
2598
  };
2627
2599
  let response;
2628
- let errorCode = "UnknownError";
2629
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2600
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2630
2601
  switch (errorCode) {
2631
2602
  case "BadRequestException":
2632
2603
  case "com.amazonaws.amplify#BadRequestException":
@@ -2639,10 +2610,12 @@ const deserializeAws_restJson1ListDomainAssociationsCommandError = async (output
2639
2610
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2640
2611
  default:
2641
2612
  const parsedBody = parsedOutput.body;
2613
+ const $metadata = deserializeMetadata(output);
2614
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2642
2615
  response = new AmplifyServiceException_1.AmplifyServiceException({
2643
- name: parsedBody.code || parsedBody.Code || errorCode,
2616
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2644
2617
  $fault: "client",
2645
- $metadata: deserializeMetadata(output),
2618
+ $metadata,
2646
2619
  });
2647
2620
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2648
2621
  }
@@ -2672,8 +2645,7 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
2672
2645
  body: await parseBody(output.body, context),
2673
2646
  };
2674
2647
  let response;
2675
- let errorCode = "UnknownError";
2676
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2648
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2677
2649
  switch (errorCode) {
2678
2650
  case "BadRequestException":
2679
2651
  case "com.amazonaws.amplify#BadRequestException":
@@ -2689,10 +2661,12 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
2689
2661
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2690
2662
  default:
2691
2663
  const parsedBody = parsedOutput.body;
2664
+ const $metadata = deserializeMetadata(output);
2665
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2692
2666
  response = new AmplifyServiceException_1.AmplifyServiceException({
2693
- name: parsedBody.code || parsedBody.Code || errorCode,
2667
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2694
2668
  $fault: "client",
2695
- $metadata: deserializeMetadata(output),
2669
+ $metadata,
2696
2670
  });
2697
2671
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2698
2672
  }
@@ -2718,8 +2692,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2718
2692
  body: await parseBody(output.body, context),
2719
2693
  };
2720
2694
  let response;
2721
- let errorCode = "UnknownError";
2722
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2695
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2723
2696
  switch (errorCode) {
2724
2697
  case "BadRequestException":
2725
2698
  case "com.amazonaws.amplify#BadRequestException":
@@ -2732,10 +2705,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2732
2705
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2733
2706
  default:
2734
2707
  const parsedBody = parsedOutput.body;
2708
+ const $metadata = deserializeMetadata(output);
2709
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2735
2710
  response = new AmplifyServiceException_1.AmplifyServiceException({
2736
- name: parsedBody.code || parsedBody.Code || errorCode,
2711
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2737
2712
  $fault: "client",
2738
- $metadata: deserializeMetadata(output),
2713
+ $metadata,
2739
2714
  });
2740
2715
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2741
2716
  }
@@ -2765,8 +2740,7 @@ const deserializeAws_restJson1ListWebhooksCommandError = async (output, context)
2765
2740
  body: await parseBody(output.body, context),
2766
2741
  };
2767
2742
  let response;
2768
- let errorCode = "UnknownError";
2769
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2743
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2770
2744
  switch (errorCode) {
2771
2745
  case "BadRequestException":
2772
2746
  case "com.amazonaws.amplify#BadRequestException":
@@ -2782,10 +2756,12 @@ const deserializeAws_restJson1ListWebhooksCommandError = async (output, context)
2782
2756
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2783
2757
  default:
2784
2758
  const parsedBody = parsedOutput.body;
2759
+ const $metadata = deserializeMetadata(output);
2760
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2785
2761
  response = new AmplifyServiceException_1.AmplifyServiceException({
2786
- name: parsedBody.code || parsedBody.Code || errorCode,
2762
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2787
2763
  $fault: "client",
2788
- $metadata: deserializeMetadata(output),
2764
+ $metadata,
2789
2765
  });
2790
2766
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2791
2767
  }
@@ -2811,8 +2787,7 @@ const deserializeAws_restJson1StartDeploymentCommandError = async (output, conte
2811
2787
  body: await parseBody(output.body, context),
2812
2788
  };
2813
2789
  let response;
2814
- let errorCode = "UnknownError";
2815
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2790
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2816
2791
  switch (errorCode) {
2817
2792
  case "BadRequestException":
2818
2793
  case "com.amazonaws.amplify#BadRequestException":
@@ -2831,10 +2806,12 @@ const deserializeAws_restJson1StartDeploymentCommandError = async (output, conte
2831
2806
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2832
2807
  default:
2833
2808
  const parsedBody = parsedOutput.body;
2809
+ const $metadata = deserializeMetadata(output);
2810
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2834
2811
  response = new AmplifyServiceException_1.AmplifyServiceException({
2835
- name: parsedBody.code || parsedBody.Code || errorCode,
2812
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2836
2813
  $fault: "client",
2837
- $metadata: deserializeMetadata(output),
2814
+ $metadata,
2838
2815
  });
2839
2816
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2840
2817
  }
@@ -2860,8 +2837,7 @@ const deserializeAws_restJson1StartJobCommandError = async (output, context) =>
2860
2837
  body: await parseBody(output.body, context),
2861
2838
  };
2862
2839
  let response;
2863
- let errorCode = "UnknownError";
2864
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2840
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2865
2841
  switch (errorCode) {
2866
2842
  case "BadRequestException":
2867
2843
  case "com.amazonaws.amplify#BadRequestException":
@@ -2880,10 +2856,12 @@ const deserializeAws_restJson1StartJobCommandError = async (output, context) =>
2880
2856
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2881
2857
  default:
2882
2858
  const parsedBody = parsedOutput.body;
2859
+ const $metadata = deserializeMetadata(output);
2860
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2883
2861
  response = new AmplifyServiceException_1.AmplifyServiceException({
2884
- name: parsedBody.code || parsedBody.Code || errorCode,
2862
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2885
2863
  $fault: "client",
2886
- $metadata: deserializeMetadata(output),
2864
+ $metadata,
2887
2865
  });
2888
2866
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2889
2867
  }
@@ -2909,8 +2887,7 @@ const deserializeAws_restJson1StopJobCommandError = async (output, context) => {
2909
2887
  body: await parseBody(output.body, context),
2910
2888
  };
2911
2889
  let response;
2912
- let errorCode = "UnknownError";
2913
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2890
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2914
2891
  switch (errorCode) {
2915
2892
  case "BadRequestException":
2916
2893
  case "com.amazonaws.amplify#BadRequestException":
@@ -2929,10 +2906,12 @@ const deserializeAws_restJson1StopJobCommandError = async (output, context) => {
2929
2906
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
2930
2907
  default:
2931
2908
  const parsedBody = parsedOutput.body;
2909
+ const $metadata = deserializeMetadata(output);
2910
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2932
2911
  response = new AmplifyServiceException_1.AmplifyServiceException({
2933
- name: parsedBody.code || parsedBody.Code || errorCode,
2912
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2934
2913
  $fault: "client",
2935
- $metadata: deserializeMetadata(output),
2914
+ $metadata,
2936
2915
  });
2937
2916
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2938
2917
  }
@@ -2954,8 +2933,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2954
2933
  body: await parseBody(output.body, context),
2955
2934
  };
2956
2935
  let response;
2957
- let errorCode = "UnknownError";
2958
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2936
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2959
2937
  switch (errorCode) {
2960
2938
  case "BadRequestException":
2961
2939
  case "com.amazonaws.amplify#BadRequestException":
@@ -2968,10 +2946,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2968
2946
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2969
2947
  default:
2970
2948
  const parsedBody = parsedOutput.body;
2949
+ const $metadata = deserializeMetadata(output);
2950
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2971
2951
  response = new AmplifyServiceException_1.AmplifyServiceException({
2972
- name: parsedBody.code || parsedBody.Code || errorCode,
2952
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2973
2953
  $fault: "client",
2974
- $metadata: deserializeMetadata(output),
2954
+ $metadata,
2975
2955
  });
2976
2956
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2977
2957
  }
@@ -2993,8 +2973,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2993
2973
  body: await parseBody(output.body, context),
2994
2974
  };
2995
2975
  let response;
2996
- let errorCode = "UnknownError";
2997
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2976
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2998
2977
  switch (errorCode) {
2999
2978
  case "BadRequestException":
3000
2979
  case "com.amazonaws.amplify#BadRequestException":
@@ -3007,10 +2986,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3007
2986
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3008
2987
  default:
3009
2988
  const parsedBody = parsedOutput.body;
2989
+ const $metadata = deserializeMetadata(output);
2990
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3010
2991
  response = new AmplifyServiceException_1.AmplifyServiceException({
3011
- name: parsedBody.code || parsedBody.Code || errorCode,
2992
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3012
2993
  $fault: "client",
3013
- $metadata: deserializeMetadata(output),
2994
+ $metadata,
3014
2995
  });
3015
2996
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3016
2997
  }
@@ -3036,8 +3017,7 @@ const deserializeAws_restJson1UpdateAppCommandError = async (output, context) =>
3036
3017
  body: await parseBody(output.body, context),
3037
3018
  };
3038
3019
  let response;
3039
- let errorCode = "UnknownError";
3040
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3020
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3041
3021
  switch (errorCode) {
3042
3022
  case "BadRequestException":
3043
3023
  case "com.amazonaws.amplify#BadRequestException":
@@ -3053,10 +3033,12 @@ const deserializeAws_restJson1UpdateAppCommandError = async (output, context) =>
3053
3033
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
3054
3034
  default:
3055
3035
  const parsedBody = parsedOutput.body;
3036
+ const $metadata = deserializeMetadata(output);
3037
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3056
3038
  response = new AmplifyServiceException_1.AmplifyServiceException({
3057
- name: parsedBody.code || parsedBody.Code || errorCode,
3039
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3058
3040
  $fault: "client",
3059
- $metadata: deserializeMetadata(output),
3041
+ $metadata,
3060
3042
  });
3061
3043
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3062
3044
  }
@@ -3082,8 +3064,7 @@ const deserializeAws_restJson1UpdateBranchCommandError = async (output, context)
3082
3064
  body: await parseBody(output.body, context),
3083
3065
  };
3084
3066
  let response;
3085
- let errorCode = "UnknownError";
3086
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3067
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3087
3068
  switch (errorCode) {
3088
3069
  case "BadRequestException":
3089
3070
  case "com.amazonaws.amplify#BadRequestException":
@@ -3102,10 +3083,12 @@ const deserializeAws_restJson1UpdateBranchCommandError = async (output, context)
3102
3083
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
3103
3084
  default:
3104
3085
  const parsedBody = parsedOutput.body;
3086
+ const $metadata = deserializeMetadata(output);
3087
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3105
3088
  response = new AmplifyServiceException_1.AmplifyServiceException({
3106
- name: parsedBody.code || parsedBody.Code || errorCode,
3089
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3107
3090
  $fault: "client",
3108
- $metadata: deserializeMetadata(output),
3091
+ $metadata,
3109
3092
  });
3110
3093
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3111
3094
  }
@@ -3131,8 +3114,7 @@ const deserializeAws_restJson1UpdateDomainAssociationCommandError = async (outpu
3131
3114
  body: await parseBody(output.body, context),
3132
3115
  };
3133
3116
  let response;
3134
- let errorCode = "UnknownError";
3135
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3117
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3136
3118
  switch (errorCode) {
3137
3119
  case "BadRequestException":
3138
3120
  case "com.amazonaws.amplify#BadRequestException":
@@ -3151,10 +3133,12 @@ const deserializeAws_restJson1UpdateDomainAssociationCommandError = async (outpu
3151
3133
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
3152
3134
  default:
3153
3135
  const parsedBody = parsedOutput.body;
3136
+ const $metadata = deserializeMetadata(output);
3137
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3154
3138
  response = new AmplifyServiceException_1.AmplifyServiceException({
3155
- name: parsedBody.code || parsedBody.Code || errorCode,
3139
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3156
3140
  $fault: "client",
3157
- $metadata: deserializeMetadata(output),
3141
+ $metadata,
3158
3142
  });
3159
3143
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3160
3144
  }
@@ -3180,8 +3164,7 @@ const deserializeAws_restJson1UpdateWebhookCommandError = async (output, context
3180
3164
  body: await parseBody(output.body, context),
3181
3165
  };
3182
3166
  let response;
3183
- let errorCode = "UnknownError";
3184
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3167
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3185
3168
  switch (errorCode) {
3186
3169
  case "BadRequestException":
3187
3170
  case "com.amazonaws.amplify#BadRequestException":
@@ -3200,10 +3183,12 @@ const deserializeAws_restJson1UpdateWebhookCommandError = async (output, context
3200
3183
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
3201
3184
  default:
3202
3185
  const parsedBody = parsedOutput.body;
3186
+ const $metadata = deserializeMetadata(output);
3187
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3203
3188
  response = new AmplifyServiceException_1.AmplifyServiceException({
3204
- name: parsedBody.code || parsedBody.Code || errorCode,
3189
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3205
3190
  $fault: "client",
3206
- $metadata: deserializeMetadata(output),
3191
+ $metadata,
3207
3192
  });
3208
3193
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3209
3194
  }
@@ -3297,25 +3282,18 @@ const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutpu
3297
3282
  };
3298
3283
  const serializeAws_restJson1AutoBranchCreationConfig = (input, context) => {
3299
3284
  return {
3300
- ...(input.basicAuthCredentials !== undefined &&
3301
- input.basicAuthCredentials !== null && { basicAuthCredentials: input.basicAuthCredentials }),
3302
- ...(input.buildSpec !== undefined && input.buildSpec !== null && { buildSpec: input.buildSpec }),
3303
- ...(input.enableAutoBuild !== undefined &&
3304
- input.enableAutoBuild !== null && { enableAutoBuild: input.enableAutoBuild }),
3305
- ...(input.enableBasicAuth !== undefined &&
3306
- input.enableBasicAuth !== null && { enableBasicAuth: input.enableBasicAuth }),
3307
- ...(input.enablePerformanceMode !== undefined &&
3308
- input.enablePerformanceMode !== null && { enablePerformanceMode: input.enablePerformanceMode }),
3309
- ...(input.enablePullRequestPreview !== undefined &&
3310
- input.enablePullRequestPreview !== null && { enablePullRequestPreview: input.enablePullRequestPreview }),
3311
- ...(input.environmentVariables !== undefined &&
3312
- input.environmentVariables !== null && {
3285
+ ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }),
3286
+ ...(input.buildSpec != null && { buildSpec: input.buildSpec }),
3287
+ ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }),
3288
+ ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }),
3289
+ ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }),
3290
+ ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }),
3291
+ ...(input.environmentVariables != null && {
3313
3292
  environmentVariables: serializeAws_restJson1EnvironmentVariables(input.environmentVariables, context),
3314
3293
  }),
3315
- ...(input.framework !== undefined && input.framework !== null && { framework: input.framework }),
3316
- ...(input.pullRequestEnvironmentName !== undefined &&
3317
- input.pullRequestEnvironmentName !== null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
3318
- ...(input.stage !== undefined && input.stage !== null && { stage: input.stage }),
3294
+ ...(input.framework != null && { framework: input.framework }),
3295
+ ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }),
3296
+ ...(input.stage != null && { stage: input.stage }),
3319
3297
  };
3320
3298
  };
3321
3299
  const serializeAws_restJson1AutoBranchCreationPatterns = (input, context) => {
@@ -3340,10 +3318,10 @@ const serializeAws_restJson1AutoSubDomainCreationPatterns = (input, context) =>
3340
3318
  };
3341
3319
  const serializeAws_restJson1CustomRule = (input, context) => {
3342
3320
  return {
3343
- ...(input.condition !== undefined && input.condition !== null && { condition: input.condition }),
3344
- ...(input.source !== undefined && input.source !== null && { source: input.source }),
3345
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
3346
- ...(input.target !== undefined && input.target !== null && { target: input.target }),
3321
+ ...(input.condition != null && { condition: input.condition }),
3322
+ ...(input.source != null && { source: input.source }),
3323
+ ...(input.status != null && { status: input.status }),
3324
+ ...(input.target != null && { target: input.target }),
3347
3325
  };
3348
3326
  };
3349
3327
  const serializeAws_restJson1CustomRules = (input, context) => {
@@ -3380,8 +3358,8 @@ const serializeAws_restJson1FileMap = (input, context) => {
3380
3358
  };
3381
3359
  const serializeAws_restJson1SubDomainSetting = (input, context) => {
3382
3360
  return {
3383
- ...(input.branchName !== undefined && input.branchName !== null && { branchName: input.branchName }),
3384
- ...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }),
3361
+ ...(input.branchName != null && { branchName: input.branchName }),
3362
+ ...(input.prefix != null && { prefix: input.prefix }),
3385
3363
  };
3386
3364
  };
3387
3365
  const serializeAws_restJson1SubDomainSettings = (input, context) => {
@@ -3409,44 +3387,36 @@ const deserializeAws_restJson1App = (output, context) => {
3409
3387
  return {
3410
3388
  appArn: (0, smithy_client_1.expectString)(output.appArn),
3411
3389
  appId: (0, smithy_client_1.expectString)(output.appId),
3412
- autoBranchCreationConfig: output.autoBranchCreationConfig !== undefined && output.autoBranchCreationConfig !== null
3390
+ autoBranchCreationConfig: output.autoBranchCreationConfig != null
3413
3391
  ? deserializeAws_restJson1AutoBranchCreationConfig(output.autoBranchCreationConfig, context)
3414
3392
  : undefined,
3415
- autoBranchCreationPatterns: output.autoBranchCreationPatterns !== undefined && output.autoBranchCreationPatterns !== null
3393
+ autoBranchCreationPatterns: output.autoBranchCreationPatterns != null
3416
3394
  ? deserializeAws_restJson1AutoBranchCreationPatterns(output.autoBranchCreationPatterns, context)
3417
3395
  : undefined,
3418
3396
  basicAuthCredentials: (0, smithy_client_1.expectString)(output.basicAuthCredentials),
3419
3397
  buildSpec: (0, smithy_client_1.expectString)(output.buildSpec),
3420
- createTime: output.createTime !== undefined && output.createTime !== null
3421
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime)))
3422
- : undefined,
3398
+ createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
3423
3399
  customHeaders: (0, smithy_client_1.expectString)(output.customHeaders),
3424
- customRules: output.customRules !== undefined && output.customRules !== null
3425
- ? deserializeAws_restJson1CustomRules(output.customRules, context)
3426
- : undefined,
3400
+ customRules: output.customRules != null ? deserializeAws_restJson1CustomRules(output.customRules, context) : undefined,
3427
3401
  defaultDomain: (0, smithy_client_1.expectString)(output.defaultDomain),
3428
3402
  description: (0, smithy_client_1.expectString)(output.description),
3429
3403
  enableAutoBranchCreation: (0, smithy_client_1.expectBoolean)(output.enableAutoBranchCreation),
3430
3404
  enableBasicAuth: (0, smithy_client_1.expectBoolean)(output.enableBasicAuth),
3431
3405
  enableBranchAutoBuild: (0, smithy_client_1.expectBoolean)(output.enableBranchAutoBuild),
3432
3406
  enableBranchAutoDeletion: (0, smithy_client_1.expectBoolean)(output.enableBranchAutoDeletion),
3433
- environmentVariables: output.environmentVariables !== undefined && output.environmentVariables !== null
3407
+ environmentVariables: output.environmentVariables != null
3434
3408
  ? deserializeAws_restJson1EnvironmentVariables(output.environmentVariables, context)
3435
3409
  : undefined,
3436
3410
  iamServiceRoleArn: (0, smithy_client_1.expectString)(output.iamServiceRoleArn),
3437
3411
  name: (0, smithy_client_1.expectString)(output.name),
3438
3412
  platform: (0, smithy_client_1.expectString)(output.platform),
3439
- productionBranch: output.productionBranch !== undefined && output.productionBranch !== null
3413
+ productionBranch: output.productionBranch != null
3440
3414
  ? deserializeAws_restJson1ProductionBranch(output.productionBranch, context)
3441
3415
  : undefined,
3442
3416
  repository: (0, smithy_client_1.expectString)(output.repository),
3443
3417
  repositoryCloneMethod: (0, smithy_client_1.expectString)(output.repositoryCloneMethod),
3444
- tags: output.tags !== undefined && output.tags !== null
3445
- ? deserializeAws_restJson1TagMap(output.tags, context)
3446
- : undefined,
3447
- updateTime: output.updateTime !== undefined && output.updateTime !== null
3448
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime)))
3449
- : undefined,
3418
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
3419
+ updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
3450
3420
  };
3451
3421
  };
3452
3422
  const deserializeAws_restJson1Apps = (output, context) => {
@@ -3496,7 +3466,7 @@ const deserializeAws_restJson1AutoBranchCreationConfig = (output, context) => {
3496
3466
  enableBasicAuth: (0, smithy_client_1.expectBoolean)(output.enableBasicAuth),
3497
3467
  enablePerformanceMode: (0, smithy_client_1.expectBoolean)(output.enablePerformanceMode),
3498
3468
  enablePullRequestPreview: (0, smithy_client_1.expectBoolean)(output.enablePullRequestPreview),
3499
- environmentVariables: output.environmentVariables !== undefined && output.environmentVariables !== null
3469
+ environmentVariables: output.environmentVariables != null
3500
3470
  ? deserializeAws_restJson1EnvironmentVariables(output.environmentVariables, context)
3501
3471
  : undefined,
3502
3472
  framework: (0, smithy_client_1.expectString)(output.framework),
@@ -3529,15 +3499,11 @@ const deserializeAws_restJson1AutoSubDomainCreationPatterns = (output, context)
3529
3499
  const deserializeAws_restJson1BackendEnvironment = (output, context) => {
3530
3500
  return {
3531
3501
  backendEnvironmentArn: (0, smithy_client_1.expectString)(output.backendEnvironmentArn),
3532
- createTime: output.createTime !== undefined && output.createTime !== null
3533
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime)))
3534
- : undefined,
3502
+ createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
3535
3503
  deploymentArtifacts: (0, smithy_client_1.expectString)(output.deploymentArtifacts),
3536
3504
  environmentName: (0, smithy_client_1.expectString)(output.environmentName),
3537
3505
  stackName: (0, smithy_client_1.expectString)(output.stackName),
3538
- updateTime: output.updateTime !== undefined && output.updateTime !== null
3539
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime)))
3540
- : undefined,
3506
+ updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
3541
3507
  };
3542
3508
  };
3543
3509
  const deserializeAws_restJson1BackendEnvironments = (output, context) => {
@@ -3554,7 +3520,7 @@ const deserializeAws_restJson1BackendEnvironments = (output, context) => {
3554
3520
  const deserializeAws_restJson1Branch = (output, context) => {
3555
3521
  return {
3556
3522
  activeJobId: (0, smithy_client_1.expectString)(output.activeJobId),
3557
- associatedResources: output.associatedResources !== undefined && output.associatedResources !== null
3523
+ associatedResources: output.associatedResources != null
3558
3524
  ? deserializeAws_restJson1AssociatedResources(output.associatedResources, context)
3559
3525
  : undefined,
3560
3526
  backendEnvironmentArn: (0, smithy_client_1.expectString)(output.backendEnvironmentArn),
@@ -3562,12 +3528,8 @@ const deserializeAws_restJson1Branch = (output, context) => {
3562
3528
  branchArn: (0, smithy_client_1.expectString)(output.branchArn),
3563
3529
  branchName: (0, smithy_client_1.expectString)(output.branchName),
3564
3530
  buildSpec: (0, smithy_client_1.expectString)(output.buildSpec),
3565
- createTime: output.createTime !== undefined && output.createTime !== null
3566
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime)))
3567
- : undefined,
3568
- customDomains: output.customDomains !== undefined && output.customDomains !== null
3569
- ? deserializeAws_restJson1CustomDomains(output.customDomains, context)
3570
- : undefined,
3531
+ createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
3532
+ customDomains: output.customDomains != null ? deserializeAws_restJson1CustomDomains(output.customDomains, context) : undefined,
3571
3533
  description: (0, smithy_client_1.expectString)(output.description),
3572
3534
  destinationBranch: (0, smithy_client_1.expectString)(output.destinationBranch),
3573
3535
  displayName: (0, smithy_client_1.expectString)(output.displayName),
@@ -3576,22 +3538,18 @@ const deserializeAws_restJson1Branch = (output, context) => {
3576
3538
  enableNotification: (0, smithy_client_1.expectBoolean)(output.enableNotification),
3577
3539
  enablePerformanceMode: (0, smithy_client_1.expectBoolean)(output.enablePerformanceMode),
3578
3540
  enablePullRequestPreview: (0, smithy_client_1.expectBoolean)(output.enablePullRequestPreview),
3579
- environmentVariables: output.environmentVariables !== undefined && output.environmentVariables !== null
3541
+ environmentVariables: output.environmentVariables != null
3580
3542
  ? deserializeAws_restJson1EnvironmentVariables(output.environmentVariables, context)
3581
3543
  : undefined,
3582
3544
  framework: (0, smithy_client_1.expectString)(output.framework),
3583
3545
  pullRequestEnvironmentName: (0, smithy_client_1.expectString)(output.pullRequestEnvironmentName),
3584
3546
  sourceBranch: (0, smithy_client_1.expectString)(output.sourceBranch),
3585
3547
  stage: (0, smithy_client_1.expectString)(output.stage),
3586
- tags: output.tags !== undefined && output.tags !== null
3587
- ? deserializeAws_restJson1TagMap(output.tags, context)
3588
- : undefined,
3548
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
3589
3549
  thumbnailUrl: (0, smithy_client_1.expectString)(output.thumbnailUrl),
3590
3550
  totalNumberOfJobs: (0, smithy_client_1.expectString)(output.totalNumberOfJobs),
3591
3551
  ttl: (0, smithy_client_1.expectString)(output.ttl),
3592
- updateTime: output.updateTime !== undefined && output.updateTime !== null
3593
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime)))
3594
- : undefined,
3552
+ updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
3595
3553
  };
3596
3554
  };
3597
3555
  const deserializeAws_restJson1Branches = (output, context) => {
@@ -3637,7 +3595,7 @@ const deserializeAws_restJson1CustomRules = (output, context) => {
3637
3595
  };
3638
3596
  const deserializeAws_restJson1DomainAssociation = (output, context) => {
3639
3597
  return {
3640
- autoSubDomainCreationPatterns: output.autoSubDomainCreationPatterns !== undefined && output.autoSubDomainCreationPatterns !== null
3598
+ autoSubDomainCreationPatterns: output.autoSubDomainCreationPatterns != null
3641
3599
  ? deserializeAws_restJson1AutoSubDomainCreationPatterns(output.autoSubDomainCreationPatterns, context)
3642
3600
  : undefined,
3643
3601
  autoSubDomainIAMRole: (0, smithy_client_1.expectString)(output.autoSubDomainIAMRole),
@@ -3647,9 +3605,7 @@ const deserializeAws_restJson1DomainAssociation = (output, context) => {
3647
3605
  domainStatus: (0, smithy_client_1.expectString)(output.domainStatus),
3648
3606
  enableAutoSubDomain: (0, smithy_client_1.expectBoolean)(output.enableAutoSubDomain),
3649
3607
  statusReason: (0, smithy_client_1.expectString)(output.statusReason),
3650
- subDomains: output.subDomains !== undefined && output.subDomains !== null
3651
- ? deserializeAws_restJson1SubDomains(output.subDomains, context)
3652
- : undefined,
3608
+ subDomains: output.subDomains != null ? deserializeAws_restJson1SubDomains(output.subDomains, context) : undefined,
3653
3609
  };
3654
3610
  };
3655
3611
  const deserializeAws_restJson1DomainAssociations = (output, context) => {
@@ -3687,12 +3643,8 @@ const deserializeAws_restJson1FileUploadUrls = (output, context) => {
3687
3643
  };
3688
3644
  const deserializeAws_restJson1Job = (output, context) => {
3689
3645
  return {
3690
- steps: output.steps !== undefined && output.steps !== null
3691
- ? deserializeAws_restJson1Steps(output.steps, context)
3692
- : undefined,
3693
- summary: output.summary !== undefined && output.summary !== null
3694
- ? deserializeAws_restJson1JobSummary(output.summary, context)
3695
- : undefined,
3646
+ steps: output.steps != null ? deserializeAws_restJson1Steps(output.steps, context) : undefined,
3647
+ summary: output.summary != null ? deserializeAws_restJson1JobSummary(output.summary, context) : undefined,
3696
3648
  };
3697
3649
  };
3698
3650
  const deserializeAws_restJson1JobSummaries = (output, context) => {
@@ -3710,25 +3662,19 @@ const deserializeAws_restJson1JobSummary = (output, context) => {
3710
3662
  return {
3711
3663
  commitId: (0, smithy_client_1.expectString)(output.commitId),
3712
3664
  commitMessage: (0, smithy_client_1.expectString)(output.commitMessage),
3713
- commitTime: output.commitTime !== undefined && output.commitTime !== null
3714
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.commitTime)))
3715
- : undefined,
3716
- endTime: output.endTime !== undefined && output.endTime !== null
3717
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime)))
3718
- : undefined,
3665
+ commitTime: output.commitTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.commitTime))) : undefined,
3666
+ endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
3719
3667
  jobArn: (0, smithy_client_1.expectString)(output.jobArn),
3720
3668
  jobId: (0, smithy_client_1.expectString)(output.jobId),
3721
3669
  jobType: (0, smithy_client_1.expectString)(output.jobType),
3722
- startTime: output.startTime !== undefined && output.startTime !== null
3723
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime)))
3724
- : undefined,
3670
+ startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
3725
3671
  status: (0, smithy_client_1.expectString)(output.status),
3726
3672
  };
3727
3673
  };
3728
3674
  const deserializeAws_restJson1ProductionBranch = (output, context) => {
3729
3675
  return {
3730
3676
  branchName: (0, smithy_client_1.expectString)(output.branchName),
3731
- lastDeployTime: output.lastDeployTime !== undefined && output.lastDeployTime !== null
3677
+ lastDeployTime: output.lastDeployTime != null
3732
3678
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastDeployTime)))
3733
3679
  : undefined,
3734
3680
  status: (0, smithy_client_1.expectString)(output.status),
@@ -3750,16 +3696,10 @@ const deserializeAws_restJson1Step = (output, context) => {
3750
3696
  return {
3751
3697
  artifactsUrl: (0, smithy_client_1.expectString)(output.artifactsUrl),
3752
3698
  context: (0, smithy_client_1.expectString)(output.context),
3753
- endTime: output.endTime !== undefined && output.endTime !== null
3754
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime)))
3755
- : undefined,
3699
+ endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
3756
3700
  logUrl: (0, smithy_client_1.expectString)(output.logUrl),
3757
- screenshots: output.screenshots !== undefined && output.screenshots !== null
3758
- ? deserializeAws_restJson1Screenshots(output.screenshots, context)
3759
- : undefined,
3760
- startTime: output.startTime !== undefined && output.startTime !== null
3761
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime)))
3762
- : undefined,
3701
+ screenshots: output.screenshots != null ? deserializeAws_restJson1Screenshots(output.screenshots, context) : undefined,
3702
+ startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
3763
3703
  status: (0, smithy_client_1.expectString)(output.status),
3764
3704
  statusReason: (0, smithy_client_1.expectString)(output.statusReason),
3765
3705
  stepName: (0, smithy_client_1.expectString)(output.stepName),
@@ -3781,7 +3721,7 @@ const deserializeAws_restJson1Steps = (output, context) => {
3781
3721
  const deserializeAws_restJson1SubDomain = (output, context) => {
3782
3722
  return {
3783
3723
  dnsRecord: (0, smithy_client_1.expectString)(output.dnsRecord),
3784
- subDomainSetting: output.subDomainSetting !== undefined && output.subDomainSetting !== null
3724
+ subDomainSetting: output.subDomainSetting != null
3785
3725
  ? deserializeAws_restJson1SubDomainSetting(output.subDomainSetting, context)
3786
3726
  : undefined,
3787
3727
  verified: (0, smithy_client_1.expectBoolean)(output.verified),
@@ -3818,13 +3758,9 @@ const deserializeAws_restJson1TagMap = (output, context) => {
3818
3758
  const deserializeAws_restJson1Webhook = (output, context) => {
3819
3759
  return {
3820
3760
  branchName: (0, smithy_client_1.expectString)(output.branchName),
3821
- createTime: output.createTime !== undefined && output.createTime !== null
3822
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime)))
3823
- : undefined,
3761
+ createTime: output.createTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createTime))) : undefined,
3824
3762
  description: (0, smithy_client_1.expectString)(output.description),
3825
- updateTime: output.updateTime !== undefined && output.updateTime !== null
3826
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime)))
3827
- : undefined,
3763
+ updateTime: output.updateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updateTime))) : undefined,
3828
3764
  webhookArn: (0, smithy_client_1.expectString)(output.webhookArn),
3829
3765
  webhookId: (0, smithy_client_1.expectString)(output.webhookId),
3830
3766
  webhookUrl: (0, smithy_client_1.expectString)(output.webhookUrl),
@@ -3890,5 +3826,4 @@ const loadRestJsonErrorCode = (output, data) => {
3890
3826
  if (data["__type"] !== undefined) {
3891
3827
  return sanitizeErrorCode(data["__type"]);
3892
3828
  }
3893
- return "";
3894
3829
  };