@aws-sdk/client-customer-profiles 3.131.0 → 3.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/commands/AddProfileKeyCommand.js +2 -2
  4. package/dist-cjs/commands/CreateDomainCommand.js +2 -2
  5. package/dist-cjs/commands/CreateIntegrationWorkflowCommand.js +2 -2
  6. package/dist-cjs/commands/CreateProfileCommand.js +2 -2
  7. package/dist-cjs/commands/DeleteDomainCommand.js +2 -2
  8. package/dist-cjs/commands/DeleteIntegrationCommand.js +2 -2
  9. package/dist-cjs/commands/DeleteProfileCommand.js +2 -2
  10. package/dist-cjs/commands/DeleteProfileKeyCommand.js +2 -2
  11. package/dist-cjs/commands/DeleteProfileObjectCommand.js +2 -2
  12. package/dist-cjs/commands/DeleteProfileObjectTypeCommand.js +2 -2
  13. package/dist-cjs/commands/DeleteWorkflowCommand.js +2 -2
  14. package/dist-cjs/commands/GetAutoMergingPreviewCommand.js +2 -2
  15. package/dist-cjs/commands/GetDomainCommand.js +2 -2
  16. package/dist-cjs/commands/GetIdentityResolutionJobCommand.js +2 -2
  17. package/dist-cjs/commands/GetIntegrationCommand.js +2 -2
  18. package/dist-cjs/commands/GetMatchesCommand.js +2 -2
  19. package/dist-cjs/commands/GetProfileObjectTypeCommand.js +2 -2
  20. package/dist-cjs/commands/GetProfileObjectTypeTemplateCommand.js +2 -2
  21. package/dist-cjs/commands/GetWorkflowCommand.js +2 -2
  22. package/dist-cjs/commands/GetWorkflowStepsCommand.js +2 -2
  23. package/dist-cjs/commands/ListAccountIntegrationsCommand.js +2 -2
  24. package/dist-cjs/commands/ListDomainsCommand.js +2 -2
  25. package/dist-cjs/commands/ListIdentityResolutionJobsCommand.js +2 -2
  26. package/dist-cjs/commands/ListIntegrationsCommand.js +2 -2
  27. package/dist-cjs/commands/ListProfileObjectTypeTemplatesCommand.js +2 -2
  28. package/dist-cjs/commands/ListProfileObjectTypesCommand.js +2 -2
  29. package/dist-cjs/commands/ListProfileObjectsCommand.js +2 -2
  30. package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
  31. package/dist-cjs/commands/ListWorkflowsCommand.js +2 -2
  32. package/dist-cjs/commands/MergeProfilesCommand.js +2 -2
  33. package/dist-cjs/commands/PutIntegrationCommand.js +2 -2
  34. package/dist-cjs/commands/PutProfileObjectCommand.js +2 -2
  35. package/dist-cjs/commands/PutProfileObjectTypeCommand.js +2 -2
  36. package/dist-cjs/commands/SearchProfilesCommand.js +2 -2
  37. package/dist-cjs/commands/TagResourceCommand.js +2 -2
  38. package/dist-cjs/commands/UntagResourceCommand.js +2 -2
  39. package/dist-cjs/commands/UpdateDomainCommand.js +2 -2
  40. package/dist-cjs/commands/UpdateProfileCommand.js +2 -2
  41. package/dist-cjs/models/models_0.js +507 -759
  42. package/dist-cjs/protocols/Aws_restJson1.js +542 -1199
  43. package/dist-es/commands/AddProfileKeyCommand.js +3 -3
  44. package/dist-es/commands/CreateDomainCommand.js +3 -3
  45. package/dist-es/commands/CreateIntegrationWorkflowCommand.js +3 -3
  46. package/dist-es/commands/CreateProfileCommand.js +3 -3
  47. package/dist-es/commands/DeleteDomainCommand.js +3 -3
  48. package/dist-es/commands/DeleteIntegrationCommand.js +3 -3
  49. package/dist-es/commands/DeleteProfileCommand.js +3 -3
  50. package/dist-es/commands/DeleteProfileKeyCommand.js +3 -3
  51. package/dist-es/commands/DeleteProfileObjectCommand.js +3 -3
  52. package/dist-es/commands/DeleteProfileObjectTypeCommand.js +3 -3
  53. package/dist-es/commands/DeleteWorkflowCommand.js +3 -3
  54. package/dist-es/commands/GetAutoMergingPreviewCommand.js +3 -3
  55. package/dist-es/commands/GetDomainCommand.js +3 -3
  56. package/dist-es/commands/GetIdentityResolutionJobCommand.js +3 -3
  57. package/dist-es/commands/GetIntegrationCommand.js +3 -3
  58. package/dist-es/commands/GetMatchesCommand.js +3 -3
  59. package/dist-es/commands/GetProfileObjectTypeCommand.js +3 -3
  60. package/dist-es/commands/GetProfileObjectTypeTemplateCommand.js +3 -3
  61. package/dist-es/commands/GetWorkflowCommand.js +3 -3
  62. package/dist-es/commands/GetWorkflowStepsCommand.js +3 -3
  63. package/dist-es/commands/ListAccountIntegrationsCommand.js +3 -3
  64. package/dist-es/commands/ListDomainsCommand.js +3 -3
  65. package/dist-es/commands/ListIdentityResolutionJobsCommand.js +3 -3
  66. package/dist-es/commands/ListIntegrationsCommand.js +3 -3
  67. package/dist-es/commands/ListProfileObjectTypeTemplatesCommand.js +3 -3
  68. package/dist-es/commands/ListProfileObjectTypesCommand.js +3 -3
  69. package/dist-es/commands/ListProfileObjectsCommand.js +3 -3
  70. package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
  71. package/dist-es/commands/ListWorkflowsCommand.js +3 -3
  72. package/dist-es/commands/MergeProfilesCommand.js +3 -3
  73. package/dist-es/commands/PutIntegrationCommand.js +3 -3
  74. package/dist-es/commands/PutProfileObjectCommand.js +3 -3
  75. package/dist-es/commands/PutProfileObjectTypeCommand.js +3 -3
  76. package/dist-es/commands/SearchProfilesCommand.js +3 -3
  77. package/dist-es/commands/TagResourceCommand.js +3 -3
  78. package/dist-es/commands/UntagResourceCommand.js +3 -3
  79. package/dist-es/commands/UpdateDomainCommand.js +3 -3
  80. package/dist-es/commands/UpdateProfileCommand.js +3 -3
  81. package/dist-es/models/models_0.js +126 -504
  82. package/dist-es/protocols/Aws_restJson1.js +692 -1198
  83. package/dist-types/models/models_0.d.ts +504 -756
  84. package/dist-types/ts3.4/models/models_0.d.ts +252 -504
  85. package/package.json +6 -6
@@ -12,16 +12,7 @@ const serializeAws_restJson1AddProfileKeyCommand = async (input, context) => {
12
12
  "content-type": "application/json",
13
13
  };
14
14
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/keys";
15
- if (input.DomainName !== undefined) {
16
- const labelValue = input.DomainName;
17
- if (labelValue.length <= 0) {
18
- throw new Error("Empty value provided for input HTTP label: DomainName.");
19
- }
20
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
21
- }
22
- else {
23
- throw new Error("No value provided for input HTTP label: DomainName.");
24
- }
15
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
25
16
  let body;
26
17
  body = JSON.stringify({
27
18
  ...(input.KeyName != null && { KeyName: input.KeyName }),
@@ -45,16 +36,7 @@ const serializeAws_restJson1CreateDomainCommand = async (input, context) => {
45
36
  "content-type": "application/json",
46
37
  };
47
38
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}";
48
- if (input.DomainName !== undefined) {
49
- const labelValue = input.DomainName;
50
- if (labelValue.length <= 0) {
51
- throw new Error("Empty value provided for input HTTP label: DomainName.");
52
- }
53
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
54
- }
55
- else {
56
- throw new Error("No value provided for input HTTP label: DomainName.");
57
- }
39
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
58
40
  let body;
59
41
  body = JSON.stringify({
60
42
  ...(input.DeadLetterQueueUrl != null && { DeadLetterQueueUrl: input.DeadLetterQueueUrl }),
@@ -81,16 +63,7 @@ const serializeAws_restJson1CreateIntegrationWorkflowCommand = async (input, con
81
63
  };
82
64
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
83
65
  "/domains/{DomainName}/workflows/integrations";
84
- if (input.DomainName !== undefined) {
85
- const labelValue = input.DomainName;
86
- if (labelValue.length <= 0) {
87
- throw new Error("Empty value provided for input HTTP label: DomainName.");
88
- }
89
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
90
- }
91
- else {
92
- throw new Error("No value provided for input HTTP label: DomainName.");
93
- }
66
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
94
67
  let body;
95
68
  body = JSON.stringify({
96
69
  ...(input.IntegrationConfig != null && {
@@ -118,16 +91,7 @@ const serializeAws_restJson1CreateProfileCommand = async (input, context) => {
118
91
  "content-type": "application/json",
119
92
  };
120
93
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles";
121
- if (input.DomainName !== undefined) {
122
- const labelValue = input.DomainName;
123
- if (labelValue.length <= 0) {
124
- throw new Error("Empty value provided for input HTTP label: DomainName.");
125
- }
126
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
127
- }
128
- else {
129
- throw new Error("No value provided for input HTTP label: DomainName.");
130
- }
94
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
131
95
  let body;
132
96
  body = JSON.stringify({
133
97
  ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }),
@@ -173,16 +137,7 @@ const serializeAws_restJson1DeleteDomainCommand = async (input, context) => {
173
137
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
138
  const headers = {};
175
139
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}";
176
- if (input.DomainName !== undefined) {
177
- const labelValue = input.DomainName;
178
- if (labelValue.length <= 0) {
179
- throw new Error("Empty value provided for input HTTP label: DomainName.");
180
- }
181
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
182
- }
183
- else {
184
- throw new Error("No value provided for input HTTP label: DomainName.");
185
- }
140
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
186
141
  let body;
187
142
  return new protocol_http_1.HttpRequest({
188
143
  protocol,
@@ -201,16 +156,7 @@ const serializeAws_restJson1DeleteIntegrationCommand = async (input, context) =>
201
156
  "content-type": "application/json",
202
157
  };
203
158
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations/delete";
204
- if (input.DomainName !== undefined) {
205
- const labelValue = input.DomainName;
206
- if (labelValue.length <= 0) {
207
- throw new Error("Empty value provided for input HTTP label: DomainName.");
208
- }
209
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
210
- }
211
- else {
212
- throw new Error("No value provided for input HTTP label: DomainName.");
213
- }
159
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
214
160
  let body;
215
161
  body = JSON.stringify({
216
162
  ...(input.Uri != null && { Uri: input.Uri }),
@@ -232,16 +178,7 @@ const serializeAws_restJson1DeleteProfileCommand = async (input, context) => {
232
178
  "content-type": "application/json",
233
179
  };
234
180
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/delete";
235
- if (input.DomainName !== undefined) {
236
- const labelValue = input.DomainName;
237
- if (labelValue.length <= 0) {
238
- throw new Error("Empty value provided for input HTTP label: DomainName.");
239
- }
240
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
241
- }
242
- else {
243
- throw new Error("No value provided for input HTTP label: DomainName.");
244
- }
181
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
245
182
  let body;
246
183
  body = JSON.stringify({
247
184
  ...(input.ProfileId != null && { ProfileId: input.ProfileId }),
@@ -264,16 +201,7 @@ const serializeAws_restJson1DeleteProfileKeyCommand = async (input, context) =>
264
201
  };
265
202
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
266
203
  "/domains/{DomainName}/profiles/keys/delete";
267
- if (input.DomainName !== undefined) {
268
- const labelValue = input.DomainName;
269
- if (labelValue.length <= 0) {
270
- throw new Error("Empty value provided for input HTTP label: DomainName.");
271
- }
272
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
273
- }
274
- else {
275
- throw new Error("No value provided for input HTTP label: DomainName.");
276
- }
204
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
277
205
  let body;
278
206
  body = JSON.stringify({
279
207
  ...(input.KeyName != null && { KeyName: input.KeyName }),
@@ -298,16 +226,7 @@ const serializeAws_restJson1DeleteProfileObjectCommand = async (input, context)
298
226
  };
299
227
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
300
228
  "/domains/{DomainName}/profiles/objects/delete";
301
- if (input.DomainName !== undefined) {
302
- const labelValue = input.DomainName;
303
- if (labelValue.length <= 0) {
304
- throw new Error("Empty value provided for input HTTP label: DomainName.");
305
- }
306
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
307
- }
308
- else {
309
- throw new Error("No value provided for input HTTP label: DomainName.");
310
- }
229
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
311
230
  let body;
312
231
  body = JSON.stringify({
313
232
  ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }),
@@ -330,26 +249,8 @@ const serializeAws_restJson1DeleteProfileObjectTypeCommand = async (input, conte
330
249
  const headers = {};
331
250
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
332
251
  "/domains/{DomainName}/object-types/{ObjectTypeName}";
333
- if (input.DomainName !== undefined) {
334
- const labelValue = input.DomainName;
335
- if (labelValue.length <= 0) {
336
- throw new Error("Empty value provided for input HTTP label: DomainName.");
337
- }
338
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
339
- }
340
- else {
341
- throw new Error("No value provided for input HTTP label: DomainName.");
342
- }
343
- if (input.ObjectTypeName !== undefined) {
344
- const labelValue = input.ObjectTypeName;
345
- if (labelValue.length <= 0) {
346
- throw new Error("Empty value provided for input HTTP label: ObjectTypeName.");
347
- }
348
- resolvedPath = resolvedPath.replace("{ObjectTypeName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
349
- }
350
- else {
351
- throw new Error("No value provided for input HTTP label: ObjectTypeName.");
352
- }
252
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
253
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ObjectTypeName", () => input.ObjectTypeName, "{ObjectTypeName}", false);
353
254
  let body;
354
255
  return new protocol_http_1.HttpRequest({
355
256
  protocol,
@@ -367,26 +268,8 @@ const serializeAws_restJson1DeleteWorkflowCommand = async (input, context) => {
367
268
  const headers = {};
368
269
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
369
270
  "/domains/{DomainName}/workflows/{WorkflowId}";
370
- if (input.DomainName !== undefined) {
371
- const labelValue = input.DomainName;
372
- if (labelValue.length <= 0) {
373
- throw new Error("Empty value provided for input HTTP label: DomainName.");
374
- }
375
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
376
- }
377
- else {
378
- throw new Error("No value provided for input HTTP label: DomainName.");
379
- }
380
- if (input.WorkflowId !== undefined) {
381
- const labelValue = input.WorkflowId;
382
- if (labelValue.length <= 0) {
383
- throw new Error("Empty value provided for input HTTP label: WorkflowId.");
384
- }
385
- resolvedPath = resolvedPath.replace("{WorkflowId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
386
- }
387
- else {
388
- throw new Error("No value provided for input HTTP label: WorkflowId.");
389
- }
271
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
272
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkflowId", () => input.WorkflowId, "{WorkflowId}", false);
390
273
  let body;
391
274
  return new protocol_http_1.HttpRequest({
392
275
  protocol,
@@ -406,16 +289,7 @@ const serializeAws_restJson1GetAutoMergingPreviewCommand = async (input, context
406
289
  };
407
290
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
408
291
  "/domains/{DomainName}/identity-resolution-jobs/auto-merging-preview";
409
- if (input.DomainName !== undefined) {
410
- const labelValue = input.DomainName;
411
- if (labelValue.length <= 0) {
412
- throw new Error("Empty value provided for input HTTP label: DomainName.");
413
- }
414
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
415
- }
416
- else {
417
- throw new Error("No value provided for input HTTP label: DomainName.");
418
- }
292
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
419
293
  let body;
420
294
  body = JSON.stringify({
421
295
  ...(input.ConflictResolution != null && {
@@ -443,16 +317,7 @@ const serializeAws_restJson1GetDomainCommand = async (input, context) => {
443
317
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
444
318
  const headers = {};
445
319
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}";
446
- if (input.DomainName !== undefined) {
447
- const labelValue = input.DomainName;
448
- if (labelValue.length <= 0) {
449
- throw new Error("Empty value provided for input HTTP label: DomainName.");
450
- }
451
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
452
- }
453
- else {
454
- throw new Error("No value provided for input HTTP label: DomainName.");
455
- }
320
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
456
321
  let body;
457
322
  return new protocol_http_1.HttpRequest({
458
323
  protocol,
@@ -470,26 +335,8 @@ const serializeAws_restJson1GetIdentityResolutionJobCommand = async (input, cont
470
335
  const headers = {};
471
336
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
472
337
  "/domains/{DomainName}/identity-resolution-jobs/{JobId}";
473
- if (input.DomainName !== undefined) {
474
- const labelValue = input.DomainName;
475
- if (labelValue.length <= 0) {
476
- throw new Error("Empty value provided for input HTTP label: DomainName.");
477
- }
478
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
479
- }
480
- else {
481
- throw new Error("No value provided for input HTTP label: DomainName.");
482
- }
483
- if (input.JobId !== undefined) {
484
- const labelValue = input.JobId;
485
- if (labelValue.length <= 0) {
486
- throw new Error("Empty value provided for input HTTP label: JobId.");
487
- }
488
- resolvedPath = resolvedPath.replace("{JobId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
489
- }
490
- else {
491
- throw new Error("No value provided for input HTTP label: JobId.");
492
- }
338
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
339
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "JobId", () => input.JobId, "{JobId}", false);
493
340
  let body;
494
341
  return new protocol_http_1.HttpRequest({
495
342
  protocol,
@@ -508,16 +355,7 @@ const serializeAws_restJson1GetIntegrationCommand = async (input, context) => {
508
355
  "content-type": "application/json",
509
356
  };
510
357
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations";
511
- if (input.DomainName !== undefined) {
512
- const labelValue = input.DomainName;
513
- if (labelValue.length <= 0) {
514
- throw new Error("Empty value provided for input HTTP label: DomainName.");
515
- }
516
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
517
- }
518
- else {
519
- throw new Error("No value provided for input HTTP label: DomainName.");
520
- }
358
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
521
359
  let body;
522
360
  body = JSON.stringify({
523
361
  ...(input.Uri != null && { Uri: input.Uri }),
@@ -537,20 +375,11 @@ const serializeAws_restJson1GetMatchesCommand = async (input, context) => {
537
375
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
538
376
  const headers = {};
539
377
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/matches";
540
- if (input.DomainName !== undefined) {
541
- const labelValue = input.DomainName;
542
- if (labelValue.length <= 0) {
543
- throw new Error("Empty value provided for input HTTP label: DomainName.");
544
- }
545
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
546
- }
547
- else {
548
- throw new Error("No value provided for input HTTP label: DomainName.");
549
- }
550
- const query = {
551
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
552
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
553
- };
378
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
379
+ const query = map({
380
+ "next-token": [, input.NextToken],
381
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
382
+ });
554
383
  let body;
555
384
  return new protocol_http_1.HttpRequest({
556
385
  protocol,
@@ -569,26 +398,8 @@ const serializeAws_restJson1GetProfileObjectTypeCommand = async (input, context)
569
398
  const headers = {};
570
399
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
571
400
  "/domains/{DomainName}/object-types/{ObjectTypeName}";
572
- if (input.DomainName !== undefined) {
573
- const labelValue = input.DomainName;
574
- if (labelValue.length <= 0) {
575
- throw new Error("Empty value provided for input HTTP label: DomainName.");
576
- }
577
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
578
- }
579
- else {
580
- throw new Error("No value provided for input HTTP label: DomainName.");
581
- }
582
- if (input.ObjectTypeName !== undefined) {
583
- const labelValue = input.ObjectTypeName;
584
- if (labelValue.length <= 0) {
585
- throw new Error("Empty value provided for input HTTP label: ObjectTypeName.");
586
- }
587
- resolvedPath = resolvedPath.replace("{ObjectTypeName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
588
- }
589
- else {
590
- throw new Error("No value provided for input HTTP label: ObjectTypeName.");
591
- }
401
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
402
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ObjectTypeName", () => input.ObjectTypeName, "{ObjectTypeName}", false);
592
403
  let body;
593
404
  return new protocol_http_1.HttpRequest({
594
405
  protocol,
@@ -605,16 +416,7 @@ const serializeAws_restJson1GetProfileObjectTypeTemplateCommand = async (input,
605
416
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
606
417
  const headers = {};
607
418
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{TemplateId}";
608
- if (input.TemplateId !== undefined) {
609
- const labelValue = input.TemplateId;
610
- if (labelValue.length <= 0) {
611
- throw new Error("Empty value provided for input HTTP label: TemplateId.");
612
- }
613
- resolvedPath = resolvedPath.replace("{TemplateId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
614
- }
615
- else {
616
- throw new Error("No value provided for input HTTP label: TemplateId.");
617
- }
419
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateId", () => input.TemplateId, "{TemplateId}", false);
618
420
  let body;
619
421
  return new protocol_http_1.HttpRequest({
620
422
  protocol,
@@ -632,26 +434,8 @@ const serializeAws_restJson1GetWorkflowCommand = async (input, context) => {
632
434
  const headers = {};
633
435
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
634
436
  "/domains/{DomainName}/workflows/{WorkflowId}";
635
- if (input.DomainName !== undefined) {
636
- const labelValue = input.DomainName;
637
- if (labelValue.length <= 0) {
638
- throw new Error("Empty value provided for input HTTP label: DomainName.");
639
- }
640
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
641
- }
642
- else {
643
- throw new Error("No value provided for input HTTP label: DomainName.");
644
- }
645
- if (input.WorkflowId !== undefined) {
646
- const labelValue = input.WorkflowId;
647
- if (labelValue.length <= 0) {
648
- throw new Error("Empty value provided for input HTTP label: WorkflowId.");
649
- }
650
- resolvedPath = resolvedPath.replace("{WorkflowId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
651
- }
652
- else {
653
- throw new Error("No value provided for input HTTP label: WorkflowId.");
654
- }
437
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
438
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkflowId", () => input.WorkflowId, "{WorkflowId}", false);
655
439
  let body;
656
440
  return new protocol_http_1.HttpRequest({
657
441
  protocol,
@@ -669,30 +453,12 @@ const serializeAws_restJson1GetWorkflowStepsCommand = async (input, context) =>
669
453
  const headers = {};
670
454
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
671
455
  "/domains/{DomainName}/workflows/{WorkflowId}/steps";
672
- if (input.DomainName !== undefined) {
673
- const labelValue = input.DomainName;
674
- if (labelValue.length <= 0) {
675
- throw new Error("Empty value provided for input HTTP label: DomainName.");
676
- }
677
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
678
- }
679
- else {
680
- throw new Error("No value provided for input HTTP label: DomainName.");
681
- }
682
- if (input.WorkflowId !== undefined) {
683
- const labelValue = input.WorkflowId;
684
- if (labelValue.length <= 0) {
685
- throw new Error("Empty value provided for input HTTP label: WorkflowId.");
686
- }
687
- resolvedPath = resolvedPath.replace("{WorkflowId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
688
- }
689
- else {
690
- throw new Error("No value provided for input HTTP label: WorkflowId.");
691
- }
692
- const query = {
693
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
694
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
695
- };
456
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
457
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkflowId", () => input.WorkflowId, "{WorkflowId}", false);
458
+ const query = map({
459
+ "next-token": [, input.NextToken],
460
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
461
+ });
696
462
  let body;
697
463
  return new protocol_http_1.HttpRequest({
698
464
  protocol,
@@ -712,11 +478,11 @@ const serializeAws_restJson1ListAccountIntegrationsCommand = async (input, conte
712
478
  "content-type": "application/json",
713
479
  };
714
480
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/integrations";
715
- const query = {
716
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
717
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
718
- ...(input.IncludeHidden !== undefined && { "include-hidden": input.IncludeHidden.toString() }),
719
- };
481
+ const query = map({
482
+ "next-token": [, input.NextToken],
483
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
484
+ "include-hidden": [() => input.IncludeHidden !== void 0, () => input.IncludeHidden.toString()],
485
+ });
720
486
  let body;
721
487
  body = JSON.stringify({
722
488
  ...(input.Uri != null && { Uri: input.Uri }),
@@ -737,10 +503,10 @@ const serializeAws_restJson1ListDomainsCommand = async (input, context) => {
737
503
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
738
504
  const headers = {};
739
505
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains";
740
- const query = {
741
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
742
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
743
- };
506
+ const query = map({
507
+ "next-token": [, input.NextToken],
508
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
509
+ });
744
510
  let body;
745
511
  return new protocol_http_1.HttpRequest({
746
512
  protocol,
@@ -759,20 +525,11 @@ const serializeAws_restJson1ListIdentityResolutionJobsCommand = async (input, co
759
525
  const headers = {};
760
526
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
761
527
  "/domains/{DomainName}/identity-resolution-jobs";
762
- if (input.DomainName !== undefined) {
763
- const labelValue = input.DomainName;
764
- if (labelValue.length <= 0) {
765
- throw new Error("Empty value provided for input HTTP label: DomainName.");
766
- }
767
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
768
- }
769
- else {
770
- throw new Error("No value provided for input HTTP label: DomainName.");
771
- }
772
- const query = {
773
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
774
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
775
- };
528
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
529
+ const query = map({
530
+ "next-token": [, input.NextToken],
531
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
532
+ });
776
533
  let body;
777
534
  return new protocol_http_1.HttpRequest({
778
535
  protocol,
@@ -790,21 +547,12 @@ const serializeAws_restJson1ListIntegrationsCommand = async (input, context) =>
790
547
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
791
548
  const headers = {};
792
549
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations";
793
- if (input.DomainName !== undefined) {
794
- const labelValue = input.DomainName;
795
- if (labelValue.length <= 0) {
796
- throw new Error("Empty value provided for input HTTP label: DomainName.");
797
- }
798
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
799
- }
800
- else {
801
- throw new Error("No value provided for input HTTP label: DomainName.");
802
- }
803
- const query = {
804
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
805
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
806
- ...(input.IncludeHidden !== undefined && { "include-hidden": input.IncludeHidden.toString() }),
807
- };
550
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
551
+ const query = map({
552
+ "next-token": [, input.NextToken],
553
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
554
+ "include-hidden": [() => input.IncludeHidden !== void 0, () => input.IncludeHidden.toString()],
555
+ });
808
556
  let body;
809
557
  return new protocol_http_1.HttpRequest({
810
558
  protocol,
@@ -824,20 +572,11 @@ const serializeAws_restJson1ListProfileObjectsCommand = async (input, context) =
824
572
  "content-type": "application/json",
825
573
  };
826
574
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/objects";
827
- if (input.DomainName !== undefined) {
828
- const labelValue = input.DomainName;
829
- if (labelValue.length <= 0) {
830
- throw new Error("Empty value provided for input HTTP label: DomainName.");
831
- }
832
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
833
- }
834
- else {
835
- throw new Error("No value provided for input HTTP label: DomainName.");
836
- }
837
- const query = {
838
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
839
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
840
- };
575
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
576
+ const query = map({
577
+ "next-token": [, input.NextToken],
578
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
579
+ });
841
580
  let body;
842
581
  body = JSON.stringify({
843
582
  ...(input.ObjectFilter != null && {
@@ -862,20 +601,11 @@ const serializeAws_restJson1ListProfileObjectTypesCommand = async (input, contex
862
601
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
863
602
  const headers = {};
864
603
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/object-types";
865
- if (input.DomainName !== undefined) {
866
- const labelValue = input.DomainName;
867
- if (labelValue.length <= 0) {
868
- throw new Error("Empty value provided for input HTTP label: DomainName.");
869
- }
870
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
871
- }
872
- else {
873
- throw new Error("No value provided for input HTTP label: DomainName.");
874
- }
875
- const query = {
876
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
877
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
878
- };
604
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
605
+ const query = map({
606
+ "next-token": [, input.NextToken],
607
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
608
+ });
879
609
  let body;
880
610
  return new protocol_http_1.HttpRequest({
881
611
  protocol,
@@ -893,10 +623,10 @@ const serializeAws_restJson1ListProfileObjectTypeTemplatesCommand = async (input
893
623
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
894
624
  const headers = {};
895
625
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/templates";
896
- const query = {
897
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
898
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
899
- };
626
+ const query = map({
627
+ "next-token": [, input.NextToken],
628
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
629
+ });
900
630
  let body;
901
631
  return new protocol_http_1.HttpRequest({
902
632
  protocol,
@@ -914,16 +644,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
914
644
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
915
645
  const headers = {};
916
646
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
917
- if (input.resourceArn !== undefined) {
918
- const labelValue = input.resourceArn;
919
- if (labelValue.length <= 0) {
920
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
921
- }
922
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
923
- }
924
- else {
925
- throw new Error("No value provided for input HTTP label: resourceArn.");
926
- }
647
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
927
648
  let body;
928
649
  return new protocol_http_1.HttpRequest({
929
650
  protocol,
@@ -942,20 +663,11 @@ const serializeAws_restJson1ListWorkflowsCommand = async (input, context) => {
942
663
  "content-type": "application/json",
943
664
  };
944
665
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/workflows";
945
- if (input.DomainName !== undefined) {
946
- const labelValue = input.DomainName;
947
- if (labelValue.length <= 0) {
948
- throw new Error("Empty value provided for input HTTP label: DomainName.");
949
- }
950
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
951
- }
952
- else {
953
- throw new Error("No value provided for input HTTP label: DomainName.");
954
- }
955
- const query = {
956
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
957
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
958
- };
666
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
667
+ const query = map({
668
+ "next-token": [, input.NextToken],
669
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
670
+ });
959
671
  let body;
960
672
  body = JSON.stringify({
961
673
  ...(input.QueryEndDate != null && { QueryEndDate: Math.round(input.QueryEndDate.getTime() / 1000) }),
@@ -982,16 +694,7 @@ const serializeAws_restJson1MergeProfilesCommand = async (input, context) => {
982
694
  };
983
695
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
984
696
  "/domains/{DomainName}/profiles/objects/merge";
985
- if (input.DomainName !== undefined) {
986
- const labelValue = input.DomainName;
987
- if (labelValue.length <= 0) {
988
- throw new Error("Empty value provided for input HTTP label: DomainName.");
989
- }
990
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
991
- }
992
- else {
993
- throw new Error("No value provided for input HTTP label: DomainName.");
994
- }
697
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
995
698
  let body;
996
699
  body = JSON.stringify({
997
700
  ...(input.FieldSourceProfileIds != null && {
@@ -1019,16 +722,7 @@ const serializeAws_restJson1PutIntegrationCommand = async (input, context) => {
1019
722
  "content-type": "application/json",
1020
723
  };
1021
724
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations";
1022
- if (input.DomainName !== undefined) {
1023
- const labelValue = input.DomainName;
1024
- if (labelValue.length <= 0) {
1025
- throw new Error("Empty value provided for input HTTP label: DomainName.");
1026
- }
1027
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1028
- }
1029
- else {
1030
- throw new Error("No value provided for input HTTP label: DomainName.");
1031
- }
725
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1032
726
  let body;
1033
727
  body = JSON.stringify({
1034
728
  ...(input.FlowDefinition != null && {
@@ -1058,16 +752,7 @@ const serializeAws_restJson1PutProfileObjectCommand = async (input, context) =>
1058
752
  "content-type": "application/json",
1059
753
  };
1060
754
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/objects";
1061
- if (input.DomainName !== undefined) {
1062
- const labelValue = input.DomainName;
1063
- if (labelValue.length <= 0) {
1064
- throw new Error("Empty value provided for input HTTP label: DomainName.");
1065
- }
1066
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1067
- }
1068
- else {
1069
- throw new Error("No value provided for input HTTP label: DomainName.");
1070
- }
755
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1071
756
  let body;
1072
757
  body = JSON.stringify({
1073
758
  ...(input.Object != null && { Object: input.Object }),
@@ -1091,26 +776,8 @@ const serializeAws_restJson1PutProfileObjectTypeCommand = async (input, context)
1091
776
  };
1092
777
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1093
778
  "/domains/{DomainName}/object-types/{ObjectTypeName}";
1094
- if (input.DomainName !== undefined) {
1095
- const labelValue = input.DomainName;
1096
- if (labelValue.length <= 0) {
1097
- throw new Error("Empty value provided for input HTTP label: DomainName.");
1098
- }
1099
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1100
- }
1101
- else {
1102
- throw new Error("No value provided for input HTTP label: DomainName.");
1103
- }
1104
- if (input.ObjectTypeName !== undefined) {
1105
- const labelValue = input.ObjectTypeName;
1106
- if (labelValue.length <= 0) {
1107
- throw new Error("Empty value provided for input HTTP label: ObjectTypeName.");
1108
- }
1109
- resolvedPath = resolvedPath.replace("{ObjectTypeName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1110
- }
1111
- else {
1112
- throw new Error("No value provided for input HTTP label: ObjectTypeName.");
1113
- }
779
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
780
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ObjectTypeName", () => input.ObjectTypeName, "{ObjectTypeName}", false);
1114
781
  let body;
1115
782
  body = JSON.stringify({
1116
783
  ...(input.AllowProfileCreation != null && { AllowProfileCreation: input.AllowProfileCreation }),
@@ -1142,20 +809,11 @@ const serializeAws_restJson1SearchProfilesCommand = async (input, context) => {
1142
809
  "content-type": "application/json",
1143
810
  };
1144
811
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/search";
1145
- if (input.DomainName !== undefined) {
1146
- const labelValue = input.DomainName;
1147
- if (labelValue.length <= 0) {
1148
- throw new Error("Empty value provided for input HTTP label: DomainName.");
1149
- }
1150
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1151
- }
1152
- else {
1153
- throw new Error("No value provided for input HTTP label: DomainName.");
1154
- }
1155
- const query = {
1156
- ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
1157
- ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
1158
- };
812
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
813
+ const query = map({
814
+ "next-token": [, input.NextToken],
815
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
816
+ });
1159
817
  let body;
1160
818
  body = JSON.stringify({
1161
819
  ...(input.KeyName != null && { KeyName: input.KeyName }),
@@ -1179,16 +837,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1179
837
  "content-type": "application/json",
1180
838
  };
1181
839
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
1182
- if (input.resourceArn !== undefined) {
1183
- const labelValue = input.resourceArn;
1184
- if (labelValue.length <= 0) {
1185
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
1186
- }
1187
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1188
- }
1189
- else {
1190
- throw new Error("No value provided for input HTTP label: resourceArn.");
1191
- }
840
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
1192
841
  let body;
1193
842
  body = JSON.stringify({
1194
843
  ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
@@ -1208,19 +857,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
1208
857
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1209
858
  const headers = {};
1210
859
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
1211
- if (input.resourceArn !== undefined) {
1212
- const labelValue = input.resourceArn;
1213
- if (labelValue.length <= 0) {
1214
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
1215
- }
1216
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1217
- }
1218
- else {
1219
- throw new Error("No value provided for input HTTP label: resourceArn.");
1220
- }
1221
- const query = {
1222
- ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry) }),
1223
- };
860
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
861
+ const query = map({
862
+ tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
863
+ });
1224
864
  let body;
1225
865
  return new protocol_http_1.HttpRequest({
1226
866
  protocol,
@@ -1240,16 +880,7 @@ const serializeAws_restJson1UpdateDomainCommand = async (input, context) => {
1240
880
  "content-type": "application/json",
1241
881
  };
1242
882
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}";
1243
- if (input.DomainName !== undefined) {
1244
- const labelValue = input.DomainName;
1245
- if (labelValue.length <= 0) {
1246
- throw new Error("Empty value provided for input HTTP label: DomainName.");
1247
- }
1248
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1249
- }
1250
- else {
1251
- throw new Error("No value provided for input HTTP label: DomainName.");
1252
- }
883
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1253
884
  let body;
1254
885
  body = JSON.stringify({
1255
886
  ...(input.DeadLetterQueueUrl != null && { DeadLetterQueueUrl: input.DeadLetterQueueUrl }),
@@ -1275,16 +906,7 @@ const serializeAws_restJson1UpdateProfileCommand = async (input, context) => {
1275
906
  "content-type": "application/json",
1276
907
  };
1277
908
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles";
1278
- if (input.DomainName !== undefined) {
1279
- const labelValue = input.DomainName;
1280
- if (labelValue.length <= 0) {
1281
- throw new Error("Empty value provided for input HTTP label: DomainName.");
1282
- }
1283
- resolvedPath = resolvedPath.replace("{DomainName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1284
- }
1285
- else {
1286
- throw new Error("No value provided for input HTTP label: DomainName.");
1287
- }
909
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1288
910
  let body;
1289
911
  body = JSON.stringify({
1290
912
  ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }),
@@ -1331,19 +953,17 @@ const deserializeAws_restJson1AddProfileKeyCommand = async (output, context) =>
1331
953
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1332
954
  return deserializeAws_restJson1AddProfileKeyCommandError(output, context);
1333
955
  }
1334
- const contents = {
956
+ const contents = map({
1335
957
  $metadata: deserializeMetadata(output),
1336
- KeyName: undefined,
1337
- Values: undefined,
1338
- };
958
+ });
1339
959
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1340
- if (data.KeyName !== undefined && data.KeyName !== null) {
960
+ if (data.KeyName != null) {
1341
961
  contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
1342
962
  }
1343
- if (data.Values !== undefined && data.Values !== null) {
963
+ if (data.Values != null) {
1344
964
  contents.Values = deserializeAws_restJson1requestValueList(data.Values, context);
1345
965
  }
1346
- return Promise.resolve(contents);
966
+ return contents;
1347
967
  };
1348
968
  exports.deserializeAws_restJson1AddProfileKeyCommand = deserializeAws_restJson1AddProfileKeyCommand;
1349
969
  const deserializeAws_restJson1AddProfileKeyCommandError = async (output, context) => {
@@ -1351,7 +971,6 @@ const deserializeAws_restJson1AddProfileKeyCommandError = async (output, context
1351
971
  ...output,
1352
972
  body: await parseBody(output.body, context),
1353
973
  };
1354
- let response;
1355
974
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1356
975
  switch (errorCode) {
1357
976
  case "AccessDeniedException":
@@ -1371,57 +990,47 @@ const deserializeAws_restJson1AddProfileKeyCommandError = async (output, context
1371
990
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1372
991
  default:
1373
992
  const parsedBody = parsedOutput.body;
1374
- const $metadata = deserializeMetadata(output);
1375
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1376
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1377
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1378
- $fault: "client",
1379
- $metadata,
993
+ (0, smithy_client_1.throwDefaultError)({
994
+ output,
995
+ parsedBody,
996
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
997
+ errorCode,
1380
998
  });
1381
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1382
999
  }
1383
1000
  };
1384
1001
  const deserializeAws_restJson1CreateDomainCommand = async (output, context) => {
1385
1002
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1386
1003
  return deserializeAws_restJson1CreateDomainCommandError(output, context);
1387
1004
  }
1388
- const contents = {
1005
+ const contents = map({
1389
1006
  $metadata: deserializeMetadata(output),
1390
- CreatedAt: undefined,
1391
- DeadLetterQueueUrl: undefined,
1392
- DefaultEncryptionKey: undefined,
1393
- DefaultExpirationDays: undefined,
1394
- DomainName: undefined,
1395
- LastUpdatedAt: undefined,
1396
- Matching: undefined,
1397
- Tags: undefined,
1398
- };
1007
+ });
1399
1008
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1400
- if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
1009
+ if (data.CreatedAt != null) {
1401
1010
  contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
1402
1011
  }
1403
- if (data.DeadLetterQueueUrl !== undefined && data.DeadLetterQueueUrl !== null) {
1012
+ if (data.DeadLetterQueueUrl != null) {
1404
1013
  contents.DeadLetterQueueUrl = (0, smithy_client_1.expectString)(data.DeadLetterQueueUrl);
1405
1014
  }
1406
- if (data.DefaultEncryptionKey !== undefined && data.DefaultEncryptionKey !== null) {
1015
+ if (data.DefaultEncryptionKey != null) {
1407
1016
  contents.DefaultEncryptionKey = (0, smithy_client_1.expectString)(data.DefaultEncryptionKey);
1408
1017
  }
1409
- if (data.DefaultExpirationDays !== undefined && data.DefaultExpirationDays !== null) {
1018
+ if (data.DefaultExpirationDays != null) {
1410
1019
  contents.DefaultExpirationDays = (0, smithy_client_1.expectInt32)(data.DefaultExpirationDays);
1411
1020
  }
1412
- if (data.DomainName !== undefined && data.DomainName !== null) {
1021
+ if (data.DomainName != null) {
1413
1022
  contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
1414
1023
  }
1415
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
1024
+ if (data.LastUpdatedAt != null) {
1416
1025
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
1417
1026
  }
1418
- if (data.Matching !== undefined && data.Matching !== null) {
1027
+ if (data.Matching != null) {
1419
1028
  contents.Matching = deserializeAws_restJson1MatchingResponse(data.Matching, context);
1420
1029
  }
1421
- if (data.Tags !== undefined && data.Tags !== null) {
1030
+ if (data.Tags != null) {
1422
1031
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
1423
1032
  }
1424
- return Promise.resolve(contents);
1033
+ return contents;
1425
1034
  };
1426
1035
  exports.deserializeAws_restJson1CreateDomainCommand = deserializeAws_restJson1CreateDomainCommand;
1427
1036
  const deserializeAws_restJson1CreateDomainCommandError = async (output, context) => {
@@ -1429,7 +1038,6 @@ const deserializeAws_restJson1CreateDomainCommandError = async (output, context)
1429
1038
  ...output,
1430
1039
  body: await parseBody(output.body, context),
1431
1040
  };
1432
- let response;
1433
1041
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1434
1042
  switch (errorCode) {
1435
1043
  case "AccessDeniedException":
@@ -1449,33 +1057,29 @@ const deserializeAws_restJson1CreateDomainCommandError = async (output, context)
1449
1057
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1450
1058
  default:
1451
1059
  const parsedBody = parsedOutput.body;
1452
- const $metadata = deserializeMetadata(output);
1453
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1454
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1455
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1456
- $fault: "client",
1457
- $metadata,
1060
+ (0, smithy_client_1.throwDefaultError)({
1061
+ output,
1062
+ parsedBody,
1063
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1064
+ errorCode,
1458
1065
  });
1459
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1460
1066
  }
1461
1067
  };
1462
1068
  const deserializeAws_restJson1CreateIntegrationWorkflowCommand = async (output, context) => {
1463
1069
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1464
1070
  return deserializeAws_restJson1CreateIntegrationWorkflowCommandError(output, context);
1465
1071
  }
1466
- const contents = {
1072
+ const contents = map({
1467
1073
  $metadata: deserializeMetadata(output),
1468
- Message: undefined,
1469
- WorkflowId: undefined,
1470
- };
1074
+ });
1471
1075
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1472
- if (data.Message !== undefined && data.Message !== null) {
1076
+ if (data.Message != null) {
1473
1077
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
1474
1078
  }
1475
- if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
1079
+ if (data.WorkflowId != null) {
1476
1080
  contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
1477
1081
  }
1478
- return Promise.resolve(contents);
1082
+ return contents;
1479
1083
  };
1480
1084
  exports.deserializeAws_restJson1CreateIntegrationWorkflowCommand = deserializeAws_restJson1CreateIntegrationWorkflowCommand;
1481
1085
  const deserializeAws_restJson1CreateIntegrationWorkflowCommandError = async (output, context) => {
@@ -1483,7 +1087,6 @@ const deserializeAws_restJson1CreateIntegrationWorkflowCommandError = async (out
1483
1087
  ...output,
1484
1088
  body: await parseBody(output.body, context),
1485
1089
  };
1486
- let response;
1487
1090
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1488
1091
  switch (errorCode) {
1489
1092
  case "AccessDeniedException":
@@ -1503,29 +1106,26 @@ const deserializeAws_restJson1CreateIntegrationWorkflowCommandError = async (out
1503
1106
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1504
1107
  default:
1505
1108
  const parsedBody = parsedOutput.body;
1506
- const $metadata = deserializeMetadata(output);
1507
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1508
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1509
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1510
- $fault: "client",
1511
- $metadata,
1109
+ (0, smithy_client_1.throwDefaultError)({
1110
+ output,
1111
+ parsedBody,
1112
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1113
+ errorCode,
1512
1114
  });
1513
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1514
1115
  }
1515
1116
  };
1516
1117
  const deserializeAws_restJson1CreateProfileCommand = async (output, context) => {
1517
1118
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1518
1119
  return deserializeAws_restJson1CreateProfileCommandError(output, context);
1519
1120
  }
1520
- const contents = {
1121
+ const contents = map({
1521
1122
  $metadata: deserializeMetadata(output),
1522
- ProfileId: undefined,
1523
- };
1123
+ });
1524
1124
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1525
- if (data.ProfileId !== undefined && data.ProfileId !== null) {
1125
+ if (data.ProfileId != null) {
1526
1126
  contents.ProfileId = (0, smithy_client_1.expectString)(data.ProfileId);
1527
1127
  }
1528
- return Promise.resolve(contents);
1128
+ return contents;
1529
1129
  };
1530
1130
  exports.deserializeAws_restJson1CreateProfileCommand = deserializeAws_restJson1CreateProfileCommand;
1531
1131
  const deserializeAws_restJson1CreateProfileCommandError = async (output, context) => {
@@ -1533,7 +1133,6 @@ const deserializeAws_restJson1CreateProfileCommandError = async (output, context
1533
1133
  ...output,
1534
1134
  body: await parseBody(output.body, context),
1535
1135
  };
1536
- let response;
1537
1136
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1538
1137
  switch (errorCode) {
1539
1138
  case "AccessDeniedException":
@@ -1553,29 +1152,26 @@ const deserializeAws_restJson1CreateProfileCommandError = async (output, context
1553
1152
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1554
1153
  default:
1555
1154
  const parsedBody = parsedOutput.body;
1556
- const $metadata = deserializeMetadata(output);
1557
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1558
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1559
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1560
- $fault: "client",
1561
- $metadata,
1155
+ (0, smithy_client_1.throwDefaultError)({
1156
+ output,
1157
+ parsedBody,
1158
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1159
+ errorCode,
1562
1160
  });
1563
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1564
1161
  }
1565
1162
  };
1566
1163
  const deserializeAws_restJson1DeleteDomainCommand = async (output, context) => {
1567
1164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1568
1165
  return deserializeAws_restJson1DeleteDomainCommandError(output, context);
1569
1166
  }
1570
- const contents = {
1167
+ const contents = map({
1571
1168
  $metadata: deserializeMetadata(output),
1572
- Message: undefined,
1573
- };
1169
+ });
1574
1170
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1575
- if (data.Message !== undefined && data.Message !== null) {
1171
+ if (data.Message != null) {
1576
1172
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
1577
1173
  }
1578
- return Promise.resolve(contents);
1174
+ return contents;
1579
1175
  };
1580
1176
  exports.deserializeAws_restJson1DeleteDomainCommand = deserializeAws_restJson1DeleteDomainCommand;
1581
1177
  const deserializeAws_restJson1DeleteDomainCommandError = async (output, context) => {
@@ -1583,7 +1179,6 @@ const deserializeAws_restJson1DeleteDomainCommandError = async (output, context)
1583
1179
  ...output,
1584
1180
  body: await parseBody(output.body, context),
1585
1181
  };
1586
- let response;
1587
1182
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1588
1183
  switch (errorCode) {
1589
1184
  case "AccessDeniedException":
@@ -1603,29 +1198,26 @@ const deserializeAws_restJson1DeleteDomainCommandError = async (output, context)
1603
1198
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1604
1199
  default:
1605
1200
  const parsedBody = parsedOutput.body;
1606
- const $metadata = deserializeMetadata(output);
1607
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1608
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1609
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1610
- $fault: "client",
1611
- $metadata,
1201
+ (0, smithy_client_1.throwDefaultError)({
1202
+ output,
1203
+ parsedBody,
1204
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1205
+ errorCode,
1612
1206
  });
1613
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1614
1207
  }
1615
1208
  };
1616
1209
  const deserializeAws_restJson1DeleteIntegrationCommand = async (output, context) => {
1617
1210
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1618
1211
  return deserializeAws_restJson1DeleteIntegrationCommandError(output, context);
1619
1212
  }
1620
- const contents = {
1213
+ const contents = map({
1621
1214
  $metadata: deserializeMetadata(output),
1622
- Message: undefined,
1623
- };
1215
+ });
1624
1216
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1625
- if (data.Message !== undefined && data.Message !== null) {
1217
+ if (data.Message != null) {
1626
1218
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
1627
1219
  }
1628
- return Promise.resolve(contents);
1220
+ return contents;
1629
1221
  };
1630
1222
  exports.deserializeAws_restJson1DeleteIntegrationCommand = deserializeAws_restJson1DeleteIntegrationCommand;
1631
1223
  const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, context) => {
@@ -1633,7 +1225,6 @@ const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, con
1633
1225
  ...output,
1634
1226
  body: await parseBody(output.body, context),
1635
1227
  };
1636
- let response;
1637
1228
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1638
1229
  switch (errorCode) {
1639
1230
  case "AccessDeniedException":
@@ -1653,29 +1244,26 @@ const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, con
1653
1244
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1654
1245
  default:
1655
1246
  const parsedBody = parsedOutput.body;
1656
- const $metadata = deserializeMetadata(output);
1657
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1658
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1659
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1660
- $fault: "client",
1661
- $metadata,
1247
+ (0, smithy_client_1.throwDefaultError)({
1248
+ output,
1249
+ parsedBody,
1250
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1251
+ errorCode,
1662
1252
  });
1663
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1664
1253
  }
1665
1254
  };
1666
1255
  const deserializeAws_restJson1DeleteProfileCommand = async (output, context) => {
1667
1256
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1668
1257
  return deserializeAws_restJson1DeleteProfileCommandError(output, context);
1669
1258
  }
1670
- const contents = {
1259
+ const contents = map({
1671
1260
  $metadata: deserializeMetadata(output),
1672
- Message: undefined,
1673
- };
1261
+ });
1674
1262
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1675
- if (data.Message !== undefined && data.Message !== null) {
1263
+ if (data.Message != null) {
1676
1264
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
1677
1265
  }
1678
- return Promise.resolve(contents);
1266
+ return contents;
1679
1267
  };
1680
1268
  exports.deserializeAws_restJson1DeleteProfileCommand = deserializeAws_restJson1DeleteProfileCommand;
1681
1269
  const deserializeAws_restJson1DeleteProfileCommandError = async (output, context) => {
@@ -1683,7 +1271,6 @@ const deserializeAws_restJson1DeleteProfileCommandError = async (output, context
1683
1271
  ...output,
1684
1272
  body: await parseBody(output.body, context),
1685
1273
  };
1686
- let response;
1687
1274
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1688
1275
  switch (errorCode) {
1689
1276
  case "AccessDeniedException":
@@ -1703,29 +1290,26 @@ const deserializeAws_restJson1DeleteProfileCommandError = async (output, context
1703
1290
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1704
1291
  default:
1705
1292
  const parsedBody = parsedOutput.body;
1706
- const $metadata = deserializeMetadata(output);
1707
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1708
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1709
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1710
- $fault: "client",
1711
- $metadata,
1293
+ (0, smithy_client_1.throwDefaultError)({
1294
+ output,
1295
+ parsedBody,
1296
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1297
+ errorCode,
1712
1298
  });
1713
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1714
1299
  }
1715
1300
  };
1716
1301
  const deserializeAws_restJson1DeleteProfileKeyCommand = async (output, context) => {
1717
1302
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1718
1303
  return deserializeAws_restJson1DeleteProfileKeyCommandError(output, context);
1719
1304
  }
1720
- const contents = {
1305
+ const contents = map({
1721
1306
  $metadata: deserializeMetadata(output),
1722
- Message: undefined,
1723
- };
1307
+ });
1724
1308
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1725
- if (data.Message !== undefined && data.Message !== null) {
1309
+ if (data.Message != null) {
1726
1310
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
1727
1311
  }
1728
- return Promise.resolve(contents);
1312
+ return contents;
1729
1313
  };
1730
1314
  exports.deserializeAws_restJson1DeleteProfileKeyCommand = deserializeAws_restJson1DeleteProfileKeyCommand;
1731
1315
  const deserializeAws_restJson1DeleteProfileKeyCommandError = async (output, context) => {
@@ -1733,7 +1317,6 @@ const deserializeAws_restJson1DeleteProfileKeyCommandError = async (output, cont
1733
1317
  ...output,
1734
1318
  body: await parseBody(output.body, context),
1735
1319
  };
1736
- let response;
1737
1320
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1738
1321
  switch (errorCode) {
1739
1322
  case "AccessDeniedException":
@@ -1753,29 +1336,26 @@ const deserializeAws_restJson1DeleteProfileKeyCommandError = async (output, cont
1753
1336
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1754
1337
  default:
1755
1338
  const parsedBody = parsedOutput.body;
1756
- const $metadata = deserializeMetadata(output);
1757
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1758
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1759
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1760
- $fault: "client",
1761
- $metadata,
1339
+ (0, smithy_client_1.throwDefaultError)({
1340
+ output,
1341
+ parsedBody,
1342
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1343
+ errorCode,
1762
1344
  });
1763
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1764
1345
  }
1765
1346
  };
1766
1347
  const deserializeAws_restJson1DeleteProfileObjectCommand = async (output, context) => {
1767
1348
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1768
1349
  return deserializeAws_restJson1DeleteProfileObjectCommandError(output, context);
1769
1350
  }
1770
- const contents = {
1351
+ const contents = map({
1771
1352
  $metadata: deserializeMetadata(output),
1772
- Message: undefined,
1773
- };
1353
+ });
1774
1354
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1775
- if (data.Message !== undefined && data.Message !== null) {
1355
+ if (data.Message != null) {
1776
1356
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
1777
1357
  }
1778
- return Promise.resolve(contents);
1358
+ return contents;
1779
1359
  };
1780
1360
  exports.deserializeAws_restJson1DeleteProfileObjectCommand = deserializeAws_restJson1DeleteProfileObjectCommand;
1781
1361
  const deserializeAws_restJson1DeleteProfileObjectCommandError = async (output, context) => {
@@ -1783,7 +1363,6 @@ const deserializeAws_restJson1DeleteProfileObjectCommandError = async (output, c
1783
1363
  ...output,
1784
1364
  body: await parseBody(output.body, context),
1785
1365
  };
1786
- let response;
1787
1366
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1788
1367
  switch (errorCode) {
1789
1368
  case "AccessDeniedException":
@@ -1803,29 +1382,26 @@ const deserializeAws_restJson1DeleteProfileObjectCommandError = async (output, c
1803
1382
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1804
1383
  default:
1805
1384
  const parsedBody = parsedOutput.body;
1806
- const $metadata = deserializeMetadata(output);
1807
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1808
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1809
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1810
- $fault: "client",
1811
- $metadata,
1385
+ (0, smithy_client_1.throwDefaultError)({
1386
+ output,
1387
+ parsedBody,
1388
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1389
+ errorCode,
1812
1390
  });
1813
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1814
1391
  }
1815
1392
  };
1816
1393
  const deserializeAws_restJson1DeleteProfileObjectTypeCommand = async (output, context) => {
1817
1394
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1818
1395
  return deserializeAws_restJson1DeleteProfileObjectTypeCommandError(output, context);
1819
1396
  }
1820
- const contents = {
1397
+ const contents = map({
1821
1398
  $metadata: deserializeMetadata(output),
1822
- Message: undefined,
1823
- };
1399
+ });
1824
1400
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1825
- if (data.Message !== undefined && data.Message !== null) {
1401
+ if (data.Message != null) {
1826
1402
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
1827
1403
  }
1828
- return Promise.resolve(contents);
1404
+ return contents;
1829
1405
  };
1830
1406
  exports.deserializeAws_restJson1DeleteProfileObjectTypeCommand = deserializeAws_restJson1DeleteProfileObjectTypeCommand;
1831
1407
  const deserializeAws_restJson1DeleteProfileObjectTypeCommandError = async (output, context) => {
@@ -1833,7 +1409,6 @@ const deserializeAws_restJson1DeleteProfileObjectTypeCommandError = async (outpu
1833
1409
  ...output,
1834
1410
  body: await parseBody(output.body, context),
1835
1411
  };
1836
- let response;
1837
1412
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1838
1413
  switch (errorCode) {
1839
1414
  case "AccessDeniedException":
@@ -1853,25 +1428,23 @@ const deserializeAws_restJson1DeleteProfileObjectTypeCommandError = async (outpu
1853
1428
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1854
1429
  default:
1855
1430
  const parsedBody = parsedOutput.body;
1856
- const $metadata = deserializeMetadata(output);
1857
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1858
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1859
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1860
- $fault: "client",
1861
- $metadata,
1431
+ (0, smithy_client_1.throwDefaultError)({
1432
+ output,
1433
+ parsedBody,
1434
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1435
+ errorCode,
1862
1436
  });
1863
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1864
1437
  }
1865
1438
  };
1866
1439
  const deserializeAws_restJson1DeleteWorkflowCommand = async (output, context) => {
1867
1440
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1868
1441
  return deserializeAws_restJson1DeleteWorkflowCommandError(output, context);
1869
1442
  }
1870
- const contents = {
1443
+ const contents = map({
1871
1444
  $metadata: deserializeMetadata(output),
1872
- };
1445
+ });
1873
1446
  await collectBody(output.body, context);
1874
- return Promise.resolve(contents);
1447
+ return contents;
1875
1448
  };
1876
1449
  exports.deserializeAws_restJson1DeleteWorkflowCommand = deserializeAws_restJson1DeleteWorkflowCommand;
1877
1450
  const deserializeAws_restJson1DeleteWorkflowCommandError = async (output, context) => {
@@ -1879,7 +1452,6 @@ const deserializeAws_restJson1DeleteWorkflowCommandError = async (output, contex
1879
1452
  ...output,
1880
1453
  body: await parseBody(output.body, context),
1881
1454
  };
1882
- let response;
1883
1455
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1884
1456
  switch (errorCode) {
1885
1457
  case "AccessDeniedException":
@@ -1899,41 +1471,35 @@ const deserializeAws_restJson1DeleteWorkflowCommandError = async (output, contex
1899
1471
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1900
1472
  default:
1901
1473
  const parsedBody = parsedOutput.body;
1902
- const $metadata = deserializeMetadata(output);
1903
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1904
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1905
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1906
- $fault: "client",
1907
- $metadata,
1474
+ (0, smithy_client_1.throwDefaultError)({
1475
+ output,
1476
+ parsedBody,
1477
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1478
+ errorCode,
1908
1479
  });
1909
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1910
1480
  }
1911
1481
  };
1912
1482
  const deserializeAws_restJson1GetAutoMergingPreviewCommand = async (output, context) => {
1913
1483
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1914
1484
  return deserializeAws_restJson1GetAutoMergingPreviewCommandError(output, context);
1915
1485
  }
1916
- const contents = {
1486
+ const contents = map({
1917
1487
  $metadata: deserializeMetadata(output),
1918
- DomainName: undefined,
1919
- NumberOfMatchesInSample: undefined,
1920
- NumberOfProfilesInSample: undefined,
1921
- NumberOfProfilesWillBeMerged: undefined,
1922
- };
1488
+ });
1923
1489
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1924
- if (data.DomainName !== undefined && data.DomainName !== null) {
1490
+ if (data.DomainName != null) {
1925
1491
  contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
1926
1492
  }
1927
- if (data.NumberOfMatchesInSample !== undefined && data.NumberOfMatchesInSample !== null) {
1493
+ if (data.NumberOfMatchesInSample != null) {
1928
1494
  contents.NumberOfMatchesInSample = (0, smithy_client_1.expectLong)(data.NumberOfMatchesInSample);
1929
1495
  }
1930
- if (data.NumberOfProfilesInSample !== undefined && data.NumberOfProfilesInSample !== null) {
1496
+ if (data.NumberOfProfilesInSample != null) {
1931
1497
  contents.NumberOfProfilesInSample = (0, smithy_client_1.expectLong)(data.NumberOfProfilesInSample);
1932
1498
  }
1933
- if (data.NumberOfProfilesWillBeMerged !== undefined && data.NumberOfProfilesWillBeMerged !== null) {
1499
+ if (data.NumberOfProfilesWillBeMerged != null) {
1934
1500
  contents.NumberOfProfilesWillBeMerged = (0, smithy_client_1.expectLong)(data.NumberOfProfilesWillBeMerged);
1935
1501
  }
1936
- return Promise.resolve(contents);
1502
+ return contents;
1937
1503
  };
1938
1504
  exports.deserializeAws_restJson1GetAutoMergingPreviewCommand = deserializeAws_restJson1GetAutoMergingPreviewCommand;
1939
1505
  const deserializeAws_restJson1GetAutoMergingPreviewCommandError = async (output, context) => {
@@ -1941,7 +1507,6 @@ const deserializeAws_restJson1GetAutoMergingPreviewCommandError = async (output,
1941
1507
  ...output,
1942
1508
  body: await parseBody(output.body, context),
1943
1509
  };
1944
- let response;
1945
1510
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1946
1511
  switch (errorCode) {
1947
1512
  case "AccessDeniedException":
@@ -1961,61 +1526,50 @@ const deserializeAws_restJson1GetAutoMergingPreviewCommandError = async (output,
1961
1526
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1962
1527
  default:
1963
1528
  const parsedBody = parsedOutput.body;
1964
- const $metadata = deserializeMetadata(output);
1965
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1966
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1967
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1968
- $fault: "client",
1969
- $metadata,
1529
+ (0, smithy_client_1.throwDefaultError)({
1530
+ output,
1531
+ parsedBody,
1532
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1533
+ errorCode,
1970
1534
  });
1971
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1972
1535
  }
1973
1536
  };
1974
1537
  const deserializeAws_restJson1GetDomainCommand = async (output, context) => {
1975
1538
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1976
1539
  return deserializeAws_restJson1GetDomainCommandError(output, context);
1977
1540
  }
1978
- const contents = {
1541
+ const contents = map({
1979
1542
  $metadata: deserializeMetadata(output),
1980
- CreatedAt: undefined,
1981
- DeadLetterQueueUrl: undefined,
1982
- DefaultEncryptionKey: undefined,
1983
- DefaultExpirationDays: undefined,
1984
- DomainName: undefined,
1985
- LastUpdatedAt: undefined,
1986
- Matching: undefined,
1987
- Stats: undefined,
1988
- Tags: undefined,
1989
- };
1543
+ });
1990
1544
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1991
- if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
1545
+ if (data.CreatedAt != null) {
1992
1546
  contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
1993
1547
  }
1994
- if (data.DeadLetterQueueUrl !== undefined && data.DeadLetterQueueUrl !== null) {
1548
+ if (data.DeadLetterQueueUrl != null) {
1995
1549
  contents.DeadLetterQueueUrl = (0, smithy_client_1.expectString)(data.DeadLetterQueueUrl);
1996
1550
  }
1997
- if (data.DefaultEncryptionKey !== undefined && data.DefaultEncryptionKey !== null) {
1551
+ if (data.DefaultEncryptionKey != null) {
1998
1552
  contents.DefaultEncryptionKey = (0, smithy_client_1.expectString)(data.DefaultEncryptionKey);
1999
1553
  }
2000
- if (data.DefaultExpirationDays !== undefined && data.DefaultExpirationDays !== null) {
1554
+ if (data.DefaultExpirationDays != null) {
2001
1555
  contents.DefaultExpirationDays = (0, smithy_client_1.expectInt32)(data.DefaultExpirationDays);
2002
1556
  }
2003
- if (data.DomainName !== undefined && data.DomainName !== null) {
1557
+ if (data.DomainName != null) {
2004
1558
  contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
2005
1559
  }
2006
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
1560
+ if (data.LastUpdatedAt != null) {
2007
1561
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2008
1562
  }
2009
- if (data.Matching !== undefined && data.Matching !== null) {
1563
+ if (data.Matching != null) {
2010
1564
  contents.Matching = deserializeAws_restJson1MatchingResponse(data.Matching, context);
2011
1565
  }
2012
- if (data.Stats !== undefined && data.Stats !== null) {
1566
+ if (data.Stats != null) {
2013
1567
  contents.Stats = deserializeAws_restJson1DomainStats(data.Stats, context);
2014
1568
  }
2015
- if (data.Tags !== undefined && data.Tags !== null) {
1569
+ if (data.Tags != null) {
2016
1570
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2017
1571
  }
2018
- return Promise.resolve(contents);
1572
+ return contents;
2019
1573
  };
2020
1574
  exports.deserializeAws_restJson1GetDomainCommand = deserializeAws_restJson1GetDomainCommand;
2021
1575
  const deserializeAws_restJson1GetDomainCommandError = async (output, context) => {
@@ -2023,7 +1577,6 @@ const deserializeAws_restJson1GetDomainCommandError = async (output, context) =>
2023
1577
  ...output,
2024
1578
  body: await parseBody(output.body, context),
2025
1579
  };
2026
- let response;
2027
1580
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2028
1581
  switch (errorCode) {
2029
1582
  case "AccessDeniedException":
@@ -2043,69 +1596,56 @@ const deserializeAws_restJson1GetDomainCommandError = async (output, context) =>
2043
1596
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2044
1597
  default:
2045
1598
  const parsedBody = parsedOutput.body;
2046
- const $metadata = deserializeMetadata(output);
2047
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2048
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2049
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2050
- $fault: "client",
2051
- $metadata,
1599
+ (0, smithy_client_1.throwDefaultError)({
1600
+ output,
1601
+ parsedBody,
1602
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1603
+ errorCode,
2052
1604
  });
2053
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2054
1605
  }
2055
1606
  };
2056
1607
  const deserializeAws_restJson1GetIdentityResolutionJobCommand = async (output, context) => {
2057
1608
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2058
1609
  return deserializeAws_restJson1GetIdentityResolutionJobCommandError(output, context);
2059
1610
  }
2060
- const contents = {
1611
+ const contents = map({
2061
1612
  $metadata: deserializeMetadata(output),
2062
- AutoMerging: undefined,
2063
- DomainName: undefined,
2064
- ExportingLocation: undefined,
2065
- JobEndTime: undefined,
2066
- JobExpirationTime: undefined,
2067
- JobId: undefined,
2068
- JobStartTime: undefined,
2069
- JobStats: undefined,
2070
- LastUpdatedAt: undefined,
2071
- Message: undefined,
2072
- Status: undefined,
2073
- };
1613
+ });
2074
1614
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2075
- if (data.AutoMerging !== undefined && data.AutoMerging !== null) {
1615
+ if (data.AutoMerging != null) {
2076
1616
  contents.AutoMerging = deserializeAws_restJson1AutoMerging(data.AutoMerging, context);
2077
1617
  }
2078
- if (data.DomainName !== undefined && data.DomainName !== null) {
1618
+ if (data.DomainName != null) {
2079
1619
  contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
2080
1620
  }
2081
- if (data.ExportingLocation !== undefined && data.ExportingLocation !== null) {
1621
+ if (data.ExportingLocation != null) {
2082
1622
  contents.ExportingLocation = deserializeAws_restJson1ExportingLocation(data.ExportingLocation, context);
2083
1623
  }
2084
- if (data.JobEndTime !== undefined && data.JobEndTime !== null) {
1624
+ if (data.JobEndTime != null) {
2085
1625
  contents.JobEndTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.JobEndTime)));
2086
1626
  }
2087
- if (data.JobExpirationTime !== undefined && data.JobExpirationTime !== null) {
1627
+ if (data.JobExpirationTime != null) {
2088
1628
  contents.JobExpirationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.JobExpirationTime)));
2089
1629
  }
2090
- if (data.JobId !== undefined && data.JobId !== null) {
1630
+ if (data.JobId != null) {
2091
1631
  contents.JobId = (0, smithy_client_1.expectString)(data.JobId);
2092
1632
  }
2093
- if (data.JobStartTime !== undefined && data.JobStartTime !== null) {
1633
+ if (data.JobStartTime != null) {
2094
1634
  contents.JobStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.JobStartTime)));
2095
1635
  }
2096
- if (data.JobStats !== undefined && data.JobStats !== null) {
1636
+ if (data.JobStats != null) {
2097
1637
  contents.JobStats = deserializeAws_restJson1JobStats(data.JobStats, context);
2098
1638
  }
2099
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
1639
+ if (data.LastUpdatedAt != null) {
2100
1640
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2101
1641
  }
2102
- if (data.Message !== undefined && data.Message !== null) {
1642
+ if (data.Message != null) {
2103
1643
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2104
1644
  }
2105
- if (data.Status !== undefined && data.Status !== null) {
1645
+ if (data.Status != null) {
2106
1646
  contents.Status = (0, smithy_client_1.expectString)(data.Status);
2107
1647
  }
2108
- return Promise.resolve(contents);
1648
+ return contents;
2109
1649
  };
2110
1650
  exports.deserializeAws_restJson1GetIdentityResolutionJobCommand = deserializeAws_restJson1GetIdentityResolutionJobCommand;
2111
1651
  const deserializeAws_restJson1GetIdentityResolutionJobCommandError = async (output, context) => {
@@ -2113,7 +1653,6 @@ const deserializeAws_restJson1GetIdentityResolutionJobCommandError = async (outp
2113
1653
  ...output,
2114
1654
  body: await parseBody(output.body, context),
2115
1655
  };
2116
- let response;
2117
1656
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2118
1657
  switch (errorCode) {
2119
1658
  case "AccessDeniedException":
@@ -2133,57 +1672,47 @@ const deserializeAws_restJson1GetIdentityResolutionJobCommandError = async (outp
2133
1672
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2134
1673
  default:
2135
1674
  const parsedBody = parsedOutput.body;
2136
- const $metadata = deserializeMetadata(output);
2137
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2138
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2139
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2140
- $fault: "client",
2141
- $metadata,
1675
+ (0, smithy_client_1.throwDefaultError)({
1676
+ output,
1677
+ parsedBody,
1678
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1679
+ errorCode,
2142
1680
  });
2143
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2144
1681
  }
2145
1682
  };
2146
1683
  const deserializeAws_restJson1GetIntegrationCommand = async (output, context) => {
2147
1684
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2148
1685
  return deserializeAws_restJson1GetIntegrationCommandError(output, context);
2149
1686
  }
2150
- const contents = {
1687
+ const contents = map({
2151
1688
  $metadata: deserializeMetadata(output),
2152
- CreatedAt: undefined,
2153
- DomainName: undefined,
2154
- LastUpdatedAt: undefined,
2155
- ObjectTypeName: undefined,
2156
- ObjectTypeNames: undefined,
2157
- Tags: undefined,
2158
- Uri: undefined,
2159
- WorkflowId: undefined,
2160
- };
1689
+ });
2161
1690
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2162
- if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
1691
+ if (data.CreatedAt != null) {
2163
1692
  contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
2164
1693
  }
2165
- if (data.DomainName !== undefined && data.DomainName !== null) {
1694
+ if (data.DomainName != null) {
2166
1695
  contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
2167
1696
  }
2168
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
1697
+ if (data.LastUpdatedAt != null) {
2169
1698
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2170
1699
  }
2171
- if (data.ObjectTypeName !== undefined && data.ObjectTypeName !== null) {
1700
+ if (data.ObjectTypeName != null) {
2172
1701
  contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
2173
1702
  }
2174
- if (data.ObjectTypeNames !== undefined && data.ObjectTypeNames !== null) {
1703
+ if (data.ObjectTypeNames != null) {
2175
1704
  contents.ObjectTypeNames = deserializeAws_restJson1ObjectTypeNames(data.ObjectTypeNames, context);
2176
1705
  }
2177
- if (data.Tags !== undefined && data.Tags !== null) {
1706
+ if (data.Tags != null) {
2178
1707
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2179
1708
  }
2180
- if (data.Uri !== undefined && data.Uri !== null) {
1709
+ if (data.Uri != null) {
2181
1710
  contents.Uri = (0, smithy_client_1.expectString)(data.Uri);
2182
1711
  }
2183
- if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
1712
+ if (data.WorkflowId != null) {
2184
1713
  contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
2185
1714
  }
2186
- return Promise.resolve(contents);
1715
+ return contents;
2187
1716
  };
2188
1717
  exports.deserializeAws_restJson1GetIntegrationCommand = deserializeAws_restJson1GetIntegrationCommand;
2189
1718
  const deserializeAws_restJson1GetIntegrationCommandError = async (output, context) => {
@@ -2191,7 +1720,6 @@ const deserializeAws_restJson1GetIntegrationCommandError = async (output, contex
2191
1720
  ...output,
2192
1721
  body: await parseBody(output.body, context),
2193
1722
  };
2194
- let response;
2195
1723
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2196
1724
  switch (errorCode) {
2197
1725
  case "AccessDeniedException":
@@ -2211,41 +1739,35 @@ const deserializeAws_restJson1GetIntegrationCommandError = async (output, contex
2211
1739
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2212
1740
  default:
2213
1741
  const parsedBody = parsedOutput.body;
2214
- const $metadata = deserializeMetadata(output);
2215
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2216
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2217
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2218
- $fault: "client",
2219
- $metadata,
1742
+ (0, smithy_client_1.throwDefaultError)({
1743
+ output,
1744
+ parsedBody,
1745
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1746
+ errorCode,
2220
1747
  });
2221
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2222
1748
  }
2223
1749
  };
2224
1750
  const deserializeAws_restJson1GetMatchesCommand = async (output, context) => {
2225
1751
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2226
1752
  return deserializeAws_restJson1GetMatchesCommandError(output, context);
2227
1753
  }
2228
- const contents = {
1754
+ const contents = map({
2229
1755
  $metadata: deserializeMetadata(output),
2230
- MatchGenerationDate: undefined,
2231
- Matches: undefined,
2232
- NextToken: undefined,
2233
- PotentialMatches: undefined,
2234
- };
1756
+ });
2235
1757
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2236
- if (data.MatchGenerationDate !== undefined && data.MatchGenerationDate !== null) {
1758
+ if (data.MatchGenerationDate != null) {
2237
1759
  contents.MatchGenerationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.MatchGenerationDate)));
2238
1760
  }
2239
- if (data.Matches !== undefined && data.Matches !== null) {
1761
+ if (data.Matches != null) {
2240
1762
  contents.Matches = deserializeAws_restJson1MatchesList(data.Matches, context);
2241
1763
  }
2242
- if (data.NextToken !== undefined && data.NextToken !== null) {
1764
+ if (data.NextToken != null) {
2243
1765
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2244
1766
  }
2245
- if (data.PotentialMatches !== undefined && data.PotentialMatches !== null) {
1767
+ if (data.PotentialMatches != null) {
2246
1768
  contents.PotentialMatches = (0, smithy_client_1.expectInt32)(data.PotentialMatches);
2247
1769
  }
2248
- return Promise.resolve(contents);
1770
+ return contents;
2249
1771
  };
2250
1772
  exports.deserializeAws_restJson1GetMatchesCommand = deserializeAws_restJson1GetMatchesCommand;
2251
1773
  const deserializeAws_restJson1GetMatchesCommandError = async (output, context) => {
@@ -2253,7 +1775,6 @@ const deserializeAws_restJson1GetMatchesCommandError = async (output, context) =
2253
1775
  ...output,
2254
1776
  body: await parseBody(output.body, context),
2255
1777
  };
2256
- let response;
2257
1778
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2258
1779
  switch (errorCode) {
2259
1780
  case "AccessDeniedException":
@@ -2273,73 +1794,59 @@ const deserializeAws_restJson1GetMatchesCommandError = async (output, context) =
2273
1794
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2274
1795
  default:
2275
1796
  const parsedBody = parsedOutput.body;
2276
- const $metadata = deserializeMetadata(output);
2277
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2278
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2279
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2280
- $fault: "client",
2281
- $metadata,
1797
+ (0, smithy_client_1.throwDefaultError)({
1798
+ output,
1799
+ parsedBody,
1800
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1801
+ errorCode,
2282
1802
  });
2283
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2284
1803
  }
2285
1804
  };
2286
1805
  const deserializeAws_restJson1GetProfileObjectTypeCommand = async (output, context) => {
2287
1806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2288
1807
  return deserializeAws_restJson1GetProfileObjectTypeCommandError(output, context);
2289
1808
  }
2290
- const contents = {
1809
+ const contents = map({
2291
1810
  $metadata: deserializeMetadata(output),
2292
- AllowProfileCreation: undefined,
2293
- CreatedAt: undefined,
2294
- Description: undefined,
2295
- EncryptionKey: undefined,
2296
- ExpirationDays: undefined,
2297
- Fields: undefined,
2298
- Keys: undefined,
2299
- LastUpdatedAt: undefined,
2300
- ObjectTypeName: undefined,
2301
- SourceLastUpdatedTimestampFormat: undefined,
2302
- Tags: undefined,
2303
- TemplateId: undefined,
2304
- };
1811
+ });
2305
1812
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2306
- if (data.AllowProfileCreation !== undefined && data.AllowProfileCreation !== null) {
1813
+ if (data.AllowProfileCreation != null) {
2307
1814
  contents.AllowProfileCreation = (0, smithy_client_1.expectBoolean)(data.AllowProfileCreation);
2308
1815
  }
2309
- if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
1816
+ if (data.CreatedAt != null) {
2310
1817
  contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
2311
1818
  }
2312
- if (data.Description !== undefined && data.Description !== null) {
1819
+ if (data.Description != null) {
2313
1820
  contents.Description = (0, smithy_client_1.expectString)(data.Description);
2314
1821
  }
2315
- if (data.EncryptionKey !== undefined && data.EncryptionKey !== null) {
1822
+ if (data.EncryptionKey != null) {
2316
1823
  contents.EncryptionKey = (0, smithy_client_1.expectString)(data.EncryptionKey);
2317
1824
  }
2318
- if (data.ExpirationDays !== undefined && data.ExpirationDays !== null) {
1825
+ if (data.ExpirationDays != null) {
2319
1826
  contents.ExpirationDays = (0, smithy_client_1.expectInt32)(data.ExpirationDays);
2320
1827
  }
2321
- if (data.Fields !== undefined && data.Fields !== null) {
1828
+ if (data.Fields != null) {
2322
1829
  contents.Fields = deserializeAws_restJson1FieldMap(data.Fields, context);
2323
1830
  }
2324
- if (data.Keys !== undefined && data.Keys !== null) {
1831
+ if (data.Keys != null) {
2325
1832
  contents.Keys = deserializeAws_restJson1KeyMap(data.Keys, context);
2326
1833
  }
2327
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
1834
+ if (data.LastUpdatedAt != null) {
2328
1835
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2329
1836
  }
2330
- if (data.ObjectTypeName !== undefined && data.ObjectTypeName !== null) {
1837
+ if (data.ObjectTypeName != null) {
2331
1838
  contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
2332
1839
  }
2333
- if (data.SourceLastUpdatedTimestampFormat !== undefined && data.SourceLastUpdatedTimestampFormat !== null) {
1840
+ if (data.SourceLastUpdatedTimestampFormat != null) {
2334
1841
  contents.SourceLastUpdatedTimestampFormat = (0, smithy_client_1.expectString)(data.SourceLastUpdatedTimestampFormat);
2335
1842
  }
2336
- if (data.Tags !== undefined && data.Tags !== null) {
1843
+ if (data.Tags != null) {
2337
1844
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2338
1845
  }
2339
- if (data.TemplateId !== undefined && data.TemplateId !== null) {
1846
+ if (data.TemplateId != null) {
2340
1847
  contents.TemplateId = (0, smithy_client_1.expectString)(data.TemplateId);
2341
1848
  }
2342
- return Promise.resolve(contents);
1849
+ return contents;
2343
1850
  };
2344
1851
  exports.deserializeAws_restJson1GetProfileObjectTypeCommand = deserializeAws_restJson1GetProfileObjectTypeCommand;
2345
1852
  const deserializeAws_restJson1GetProfileObjectTypeCommandError = async (output, context) => {
@@ -2347,7 +1854,6 @@ const deserializeAws_restJson1GetProfileObjectTypeCommandError = async (output,
2347
1854
  ...output,
2348
1855
  body: await parseBody(output.body, context),
2349
1856
  };
2350
- let response;
2351
1857
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2352
1858
  switch (errorCode) {
2353
1859
  case "AccessDeniedException":
@@ -2367,53 +1873,44 @@ const deserializeAws_restJson1GetProfileObjectTypeCommandError = async (output,
2367
1873
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2368
1874
  default:
2369
1875
  const parsedBody = parsedOutput.body;
2370
- const $metadata = deserializeMetadata(output);
2371
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2372
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2373
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2374
- $fault: "client",
2375
- $metadata,
1876
+ (0, smithy_client_1.throwDefaultError)({
1877
+ output,
1878
+ parsedBody,
1879
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1880
+ errorCode,
2376
1881
  });
2377
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2378
1882
  }
2379
1883
  };
2380
1884
  const deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = async (output, context) => {
2381
1885
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2382
1886
  return deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError(output, context);
2383
1887
  }
2384
- const contents = {
1888
+ const contents = map({
2385
1889
  $metadata: deserializeMetadata(output),
2386
- AllowProfileCreation: undefined,
2387
- Fields: undefined,
2388
- Keys: undefined,
2389
- SourceLastUpdatedTimestampFormat: undefined,
2390
- SourceName: undefined,
2391
- SourceObject: undefined,
2392
- TemplateId: undefined,
2393
- };
1890
+ });
2394
1891
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2395
- if (data.AllowProfileCreation !== undefined && data.AllowProfileCreation !== null) {
1892
+ if (data.AllowProfileCreation != null) {
2396
1893
  contents.AllowProfileCreation = (0, smithy_client_1.expectBoolean)(data.AllowProfileCreation);
2397
1894
  }
2398
- if (data.Fields !== undefined && data.Fields !== null) {
1895
+ if (data.Fields != null) {
2399
1896
  contents.Fields = deserializeAws_restJson1FieldMap(data.Fields, context);
2400
1897
  }
2401
- if (data.Keys !== undefined && data.Keys !== null) {
1898
+ if (data.Keys != null) {
2402
1899
  contents.Keys = deserializeAws_restJson1KeyMap(data.Keys, context);
2403
1900
  }
2404
- if (data.SourceLastUpdatedTimestampFormat !== undefined && data.SourceLastUpdatedTimestampFormat !== null) {
1901
+ if (data.SourceLastUpdatedTimestampFormat != null) {
2405
1902
  contents.SourceLastUpdatedTimestampFormat = (0, smithy_client_1.expectString)(data.SourceLastUpdatedTimestampFormat);
2406
1903
  }
2407
- if (data.SourceName !== undefined && data.SourceName !== null) {
1904
+ if (data.SourceName != null) {
2408
1905
  contents.SourceName = (0, smithy_client_1.expectString)(data.SourceName);
2409
1906
  }
2410
- if (data.SourceObject !== undefined && data.SourceObject !== null) {
1907
+ if (data.SourceObject != null) {
2411
1908
  contents.SourceObject = (0, smithy_client_1.expectString)(data.SourceObject);
2412
1909
  }
2413
- if (data.TemplateId !== undefined && data.TemplateId !== null) {
1910
+ if (data.TemplateId != null) {
2414
1911
  contents.TemplateId = (0, smithy_client_1.expectString)(data.TemplateId);
2415
1912
  }
2416
- return Promise.resolve(contents);
1913
+ return contents;
2417
1914
  };
2418
1915
  exports.deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = deserializeAws_restJson1GetProfileObjectTypeTemplateCommand;
2419
1916
  const deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = async (output, context) => {
@@ -2421,7 +1918,6 @@ const deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = async (
2421
1918
  ...output,
2422
1919
  body: await parseBody(output.body, context),
2423
1920
  };
2424
- let response;
2425
1921
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2426
1922
  switch (errorCode) {
2427
1923
  case "AccessDeniedException":
@@ -2441,57 +1937,47 @@ const deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = async (
2441
1937
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2442
1938
  default:
2443
1939
  const parsedBody = parsedOutput.body;
2444
- const $metadata = deserializeMetadata(output);
2445
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2446
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2447
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2448
- $fault: "client",
2449
- $metadata,
1940
+ (0, smithy_client_1.throwDefaultError)({
1941
+ output,
1942
+ parsedBody,
1943
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1944
+ errorCode,
2450
1945
  });
2451
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2452
1946
  }
2453
1947
  };
2454
1948
  const deserializeAws_restJson1GetWorkflowCommand = async (output, context) => {
2455
1949
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2456
1950
  return deserializeAws_restJson1GetWorkflowCommandError(output, context);
2457
1951
  }
2458
- const contents = {
1952
+ const contents = map({
2459
1953
  $metadata: deserializeMetadata(output),
2460
- Attributes: undefined,
2461
- ErrorDescription: undefined,
2462
- LastUpdatedAt: undefined,
2463
- Metrics: undefined,
2464
- StartDate: undefined,
2465
- Status: undefined,
2466
- WorkflowId: undefined,
2467
- WorkflowType: undefined,
2468
- };
1954
+ });
2469
1955
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2470
- if (data.Attributes !== undefined && data.Attributes !== null) {
1956
+ if (data.Attributes != null) {
2471
1957
  contents.Attributes = deserializeAws_restJson1WorkflowAttributes(data.Attributes, context);
2472
1958
  }
2473
- if (data.ErrorDescription !== undefined && data.ErrorDescription !== null) {
1959
+ if (data.ErrorDescription != null) {
2474
1960
  contents.ErrorDescription = (0, smithy_client_1.expectString)(data.ErrorDescription);
2475
1961
  }
2476
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
1962
+ if (data.LastUpdatedAt != null) {
2477
1963
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2478
1964
  }
2479
- if (data.Metrics !== undefined && data.Metrics !== null) {
1965
+ if (data.Metrics != null) {
2480
1966
  contents.Metrics = deserializeAws_restJson1WorkflowMetrics(data.Metrics, context);
2481
1967
  }
2482
- if (data.StartDate !== undefined && data.StartDate !== null) {
1968
+ if (data.StartDate != null) {
2483
1969
  contents.StartDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.StartDate)));
2484
1970
  }
2485
- if (data.Status !== undefined && data.Status !== null) {
1971
+ if (data.Status != null) {
2486
1972
  contents.Status = (0, smithy_client_1.expectString)(data.Status);
2487
1973
  }
2488
- if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
1974
+ if (data.WorkflowId != null) {
2489
1975
  contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
2490
1976
  }
2491
- if (data.WorkflowType !== undefined && data.WorkflowType !== null) {
1977
+ if (data.WorkflowType != null) {
2492
1978
  contents.WorkflowType = (0, smithy_client_1.expectString)(data.WorkflowType);
2493
1979
  }
2494
- return Promise.resolve(contents);
1980
+ return contents;
2495
1981
  };
2496
1982
  exports.deserializeAws_restJson1GetWorkflowCommand = deserializeAws_restJson1GetWorkflowCommand;
2497
1983
  const deserializeAws_restJson1GetWorkflowCommandError = async (output, context) => {
@@ -2499,7 +1985,6 @@ const deserializeAws_restJson1GetWorkflowCommandError = async (output, context)
2499
1985
  ...output,
2500
1986
  body: await parseBody(output.body, context),
2501
1987
  };
2502
- let response;
2503
1988
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2504
1989
  switch (errorCode) {
2505
1990
  case "AccessDeniedException":
@@ -2519,41 +2004,35 @@ const deserializeAws_restJson1GetWorkflowCommandError = async (output, context)
2519
2004
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2520
2005
  default:
2521
2006
  const parsedBody = parsedOutput.body;
2522
- const $metadata = deserializeMetadata(output);
2523
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2524
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2525
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2526
- $fault: "client",
2527
- $metadata,
2007
+ (0, smithy_client_1.throwDefaultError)({
2008
+ output,
2009
+ parsedBody,
2010
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2011
+ errorCode,
2528
2012
  });
2529
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2530
2013
  }
2531
2014
  };
2532
2015
  const deserializeAws_restJson1GetWorkflowStepsCommand = async (output, context) => {
2533
2016
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2534
2017
  return deserializeAws_restJson1GetWorkflowStepsCommandError(output, context);
2535
2018
  }
2536
- const contents = {
2019
+ const contents = map({
2537
2020
  $metadata: deserializeMetadata(output),
2538
- Items: undefined,
2539
- NextToken: undefined,
2540
- WorkflowId: undefined,
2541
- WorkflowType: undefined,
2542
- };
2021
+ });
2543
2022
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2544
- if (data.Items !== undefined && data.Items !== null) {
2023
+ if (data.Items != null) {
2545
2024
  contents.Items = deserializeAws_restJson1WorkflowStepsList(data.Items, context);
2546
2025
  }
2547
- if (data.NextToken !== undefined && data.NextToken !== null) {
2026
+ if (data.NextToken != null) {
2548
2027
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2549
2028
  }
2550
- if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
2029
+ if (data.WorkflowId != null) {
2551
2030
  contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
2552
2031
  }
2553
- if (data.WorkflowType !== undefined && data.WorkflowType !== null) {
2032
+ if (data.WorkflowType != null) {
2554
2033
  contents.WorkflowType = (0, smithy_client_1.expectString)(data.WorkflowType);
2555
2034
  }
2556
- return Promise.resolve(contents);
2035
+ return contents;
2557
2036
  };
2558
2037
  exports.deserializeAws_restJson1GetWorkflowStepsCommand = deserializeAws_restJson1GetWorkflowStepsCommand;
2559
2038
  const deserializeAws_restJson1GetWorkflowStepsCommandError = async (output, context) => {
@@ -2561,7 +2040,6 @@ const deserializeAws_restJson1GetWorkflowStepsCommandError = async (output, cont
2561
2040
  ...output,
2562
2041
  body: await parseBody(output.body, context),
2563
2042
  };
2564
- let response;
2565
2043
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2566
2044
  switch (errorCode) {
2567
2045
  case "AccessDeniedException":
@@ -2581,33 +2059,29 @@ const deserializeAws_restJson1GetWorkflowStepsCommandError = async (output, cont
2581
2059
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2582
2060
  default:
2583
2061
  const parsedBody = parsedOutput.body;
2584
- const $metadata = deserializeMetadata(output);
2585
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2586
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2587
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2588
- $fault: "client",
2589
- $metadata,
2062
+ (0, smithy_client_1.throwDefaultError)({
2063
+ output,
2064
+ parsedBody,
2065
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2066
+ errorCode,
2590
2067
  });
2591
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2592
2068
  }
2593
2069
  };
2594
2070
  const deserializeAws_restJson1ListAccountIntegrationsCommand = async (output, context) => {
2595
2071
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2596
2072
  return deserializeAws_restJson1ListAccountIntegrationsCommandError(output, context);
2597
2073
  }
2598
- const contents = {
2074
+ const contents = map({
2599
2075
  $metadata: deserializeMetadata(output),
2600
- Items: undefined,
2601
- NextToken: undefined,
2602
- };
2076
+ });
2603
2077
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2604
- if (data.Items !== undefined && data.Items !== null) {
2078
+ if (data.Items != null) {
2605
2079
  contents.Items = deserializeAws_restJson1IntegrationList(data.Items, context);
2606
2080
  }
2607
- if (data.NextToken !== undefined && data.NextToken !== null) {
2081
+ if (data.NextToken != null) {
2608
2082
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2609
2083
  }
2610
- return Promise.resolve(contents);
2084
+ return contents;
2611
2085
  };
2612
2086
  exports.deserializeAws_restJson1ListAccountIntegrationsCommand = deserializeAws_restJson1ListAccountIntegrationsCommand;
2613
2087
  const deserializeAws_restJson1ListAccountIntegrationsCommandError = async (output, context) => {
@@ -2615,7 +2089,6 @@ const deserializeAws_restJson1ListAccountIntegrationsCommandError = async (outpu
2615
2089
  ...output,
2616
2090
  body: await parseBody(output.body, context),
2617
2091
  };
2618
- let response;
2619
2092
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2620
2093
  switch (errorCode) {
2621
2094
  case "AccessDeniedException":
@@ -2635,33 +2108,29 @@ const deserializeAws_restJson1ListAccountIntegrationsCommandError = async (outpu
2635
2108
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2636
2109
  default:
2637
2110
  const parsedBody = parsedOutput.body;
2638
- const $metadata = deserializeMetadata(output);
2639
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2640
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2641
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2642
- $fault: "client",
2643
- $metadata,
2111
+ (0, smithy_client_1.throwDefaultError)({
2112
+ output,
2113
+ parsedBody,
2114
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2115
+ errorCode,
2644
2116
  });
2645
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2646
2117
  }
2647
2118
  };
2648
2119
  const deserializeAws_restJson1ListDomainsCommand = async (output, context) => {
2649
2120
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2650
2121
  return deserializeAws_restJson1ListDomainsCommandError(output, context);
2651
2122
  }
2652
- const contents = {
2123
+ const contents = map({
2653
2124
  $metadata: deserializeMetadata(output),
2654
- Items: undefined,
2655
- NextToken: undefined,
2656
- };
2125
+ });
2657
2126
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2658
- if (data.Items !== undefined && data.Items !== null) {
2127
+ if (data.Items != null) {
2659
2128
  contents.Items = deserializeAws_restJson1DomainList(data.Items, context);
2660
2129
  }
2661
- if (data.NextToken !== undefined && data.NextToken !== null) {
2130
+ if (data.NextToken != null) {
2662
2131
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2663
2132
  }
2664
- return Promise.resolve(contents);
2133
+ return contents;
2665
2134
  };
2666
2135
  exports.deserializeAws_restJson1ListDomainsCommand = deserializeAws_restJson1ListDomainsCommand;
2667
2136
  const deserializeAws_restJson1ListDomainsCommandError = async (output, context) => {
@@ -2669,7 +2138,6 @@ const deserializeAws_restJson1ListDomainsCommandError = async (output, context)
2669
2138
  ...output,
2670
2139
  body: await parseBody(output.body, context),
2671
2140
  };
2672
- let response;
2673
2141
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2674
2142
  switch (errorCode) {
2675
2143
  case "AccessDeniedException":
@@ -2689,33 +2157,29 @@ const deserializeAws_restJson1ListDomainsCommandError = async (output, context)
2689
2157
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2690
2158
  default:
2691
2159
  const parsedBody = parsedOutput.body;
2692
- const $metadata = deserializeMetadata(output);
2693
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2694
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2695
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2696
- $fault: "client",
2697
- $metadata,
2160
+ (0, smithy_client_1.throwDefaultError)({
2161
+ output,
2162
+ parsedBody,
2163
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2164
+ errorCode,
2698
2165
  });
2699
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2700
2166
  }
2701
2167
  };
2702
2168
  const deserializeAws_restJson1ListIdentityResolutionJobsCommand = async (output, context) => {
2703
2169
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2704
2170
  return deserializeAws_restJson1ListIdentityResolutionJobsCommandError(output, context);
2705
2171
  }
2706
- const contents = {
2172
+ const contents = map({
2707
2173
  $metadata: deserializeMetadata(output),
2708
- IdentityResolutionJobsList: undefined,
2709
- NextToken: undefined,
2710
- };
2174
+ });
2711
2175
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2712
- if (data.IdentityResolutionJobsList !== undefined && data.IdentityResolutionJobsList !== null) {
2176
+ if (data.IdentityResolutionJobsList != null) {
2713
2177
  contents.IdentityResolutionJobsList = deserializeAws_restJson1IdentityResolutionJobsList(data.IdentityResolutionJobsList, context);
2714
2178
  }
2715
- if (data.NextToken !== undefined && data.NextToken !== null) {
2179
+ if (data.NextToken != null) {
2716
2180
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2717
2181
  }
2718
- return Promise.resolve(contents);
2182
+ return contents;
2719
2183
  };
2720
2184
  exports.deserializeAws_restJson1ListIdentityResolutionJobsCommand = deserializeAws_restJson1ListIdentityResolutionJobsCommand;
2721
2185
  const deserializeAws_restJson1ListIdentityResolutionJobsCommandError = async (output, context) => {
@@ -2723,7 +2187,6 @@ const deserializeAws_restJson1ListIdentityResolutionJobsCommandError = async (ou
2723
2187
  ...output,
2724
2188
  body: await parseBody(output.body, context),
2725
2189
  };
2726
- let response;
2727
2190
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2728
2191
  switch (errorCode) {
2729
2192
  case "AccessDeniedException":
@@ -2743,33 +2206,29 @@ const deserializeAws_restJson1ListIdentityResolutionJobsCommandError = async (ou
2743
2206
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2744
2207
  default:
2745
2208
  const parsedBody = parsedOutput.body;
2746
- const $metadata = deserializeMetadata(output);
2747
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2748
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2749
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2750
- $fault: "client",
2751
- $metadata,
2209
+ (0, smithy_client_1.throwDefaultError)({
2210
+ output,
2211
+ parsedBody,
2212
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2213
+ errorCode,
2752
2214
  });
2753
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2754
2215
  }
2755
2216
  };
2756
2217
  const deserializeAws_restJson1ListIntegrationsCommand = async (output, context) => {
2757
2218
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2758
2219
  return deserializeAws_restJson1ListIntegrationsCommandError(output, context);
2759
2220
  }
2760
- const contents = {
2221
+ const contents = map({
2761
2222
  $metadata: deserializeMetadata(output),
2762
- Items: undefined,
2763
- NextToken: undefined,
2764
- };
2223
+ });
2765
2224
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2766
- if (data.Items !== undefined && data.Items !== null) {
2225
+ if (data.Items != null) {
2767
2226
  contents.Items = deserializeAws_restJson1IntegrationList(data.Items, context);
2768
2227
  }
2769
- if (data.NextToken !== undefined && data.NextToken !== null) {
2228
+ if (data.NextToken != null) {
2770
2229
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2771
2230
  }
2772
- return Promise.resolve(contents);
2231
+ return contents;
2773
2232
  };
2774
2233
  exports.deserializeAws_restJson1ListIntegrationsCommand = deserializeAws_restJson1ListIntegrationsCommand;
2775
2234
  const deserializeAws_restJson1ListIntegrationsCommandError = async (output, context) => {
@@ -2777,7 +2236,6 @@ const deserializeAws_restJson1ListIntegrationsCommandError = async (output, cont
2777
2236
  ...output,
2778
2237
  body: await parseBody(output.body, context),
2779
2238
  };
2780
- let response;
2781
2239
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2782
2240
  switch (errorCode) {
2783
2241
  case "AccessDeniedException":
@@ -2797,33 +2255,29 @@ const deserializeAws_restJson1ListIntegrationsCommandError = async (output, cont
2797
2255
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2798
2256
  default:
2799
2257
  const parsedBody = parsedOutput.body;
2800
- const $metadata = deserializeMetadata(output);
2801
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2802
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2803
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2804
- $fault: "client",
2805
- $metadata,
2258
+ (0, smithy_client_1.throwDefaultError)({
2259
+ output,
2260
+ parsedBody,
2261
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2262
+ errorCode,
2806
2263
  });
2807
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2808
2264
  }
2809
2265
  };
2810
2266
  const deserializeAws_restJson1ListProfileObjectsCommand = async (output, context) => {
2811
2267
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2812
2268
  return deserializeAws_restJson1ListProfileObjectsCommandError(output, context);
2813
2269
  }
2814
- const contents = {
2270
+ const contents = map({
2815
2271
  $metadata: deserializeMetadata(output),
2816
- Items: undefined,
2817
- NextToken: undefined,
2818
- };
2272
+ });
2819
2273
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2820
- if (data.Items !== undefined && data.Items !== null) {
2274
+ if (data.Items != null) {
2821
2275
  contents.Items = deserializeAws_restJson1ProfileObjectList(data.Items, context);
2822
2276
  }
2823
- if (data.NextToken !== undefined && data.NextToken !== null) {
2277
+ if (data.NextToken != null) {
2824
2278
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2825
2279
  }
2826
- return Promise.resolve(contents);
2280
+ return contents;
2827
2281
  };
2828
2282
  exports.deserializeAws_restJson1ListProfileObjectsCommand = deserializeAws_restJson1ListProfileObjectsCommand;
2829
2283
  const deserializeAws_restJson1ListProfileObjectsCommandError = async (output, context) => {
@@ -2831,7 +2285,6 @@ const deserializeAws_restJson1ListProfileObjectsCommandError = async (output, co
2831
2285
  ...output,
2832
2286
  body: await parseBody(output.body, context),
2833
2287
  };
2834
- let response;
2835
2288
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2836
2289
  switch (errorCode) {
2837
2290
  case "AccessDeniedException":
@@ -2851,33 +2304,29 @@ const deserializeAws_restJson1ListProfileObjectsCommandError = async (output, co
2851
2304
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2852
2305
  default:
2853
2306
  const parsedBody = parsedOutput.body;
2854
- const $metadata = deserializeMetadata(output);
2855
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2856
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2857
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2858
- $fault: "client",
2859
- $metadata,
2307
+ (0, smithy_client_1.throwDefaultError)({
2308
+ output,
2309
+ parsedBody,
2310
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2311
+ errorCode,
2860
2312
  });
2861
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2862
2313
  }
2863
2314
  };
2864
2315
  const deserializeAws_restJson1ListProfileObjectTypesCommand = async (output, context) => {
2865
2316
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2866
2317
  return deserializeAws_restJson1ListProfileObjectTypesCommandError(output, context);
2867
2318
  }
2868
- const contents = {
2319
+ const contents = map({
2869
2320
  $metadata: deserializeMetadata(output),
2870
- Items: undefined,
2871
- NextToken: undefined,
2872
- };
2321
+ });
2873
2322
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2874
- if (data.Items !== undefined && data.Items !== null) {
2323
+ if (data.Items != null) {
2875
2324
  contents.Items = deserializeAws_restJson1ProfileObjectTypeList(data.Items, context);
2876
2325
  }
2877
- if (data.NextToken !== undefined && data.NextToken !== null) {
2326
+ if (data.NextToken != null) {
2878
2327
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2879
2328
  }
2880
- return Promise.resolve(contents);
2329
+ return contents;
2881
2330
  };
2882
2331
  exports.deserializeAws_restJson1ListProfileObjectTypesCommand = deserializeAws_restJson1ListProfileObjectTypesCommand;
2883
2332
  const deserializeAws_restJson1ListProfileObjectTypesCommandError = async (output, context) => {
@@ -2885,7 +2334,6 @@ const deserializeAws_restJson1ListProfileObjectTypesCommandError = async (output
2885
2334
  ...output,
2886
2335
  body: await parseBody(output.body, context),
2887
2336
  };
2888
- let response;
2889
2337
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2890
2338
  switch (errorCode) {
2891
2339
  case "AccessDeniedException":
@@ -2905,33 +2353,29 @@ const deserializeAws_restJson1ListProfileObjectTypesCommandError = async (output
2905
2353
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2906
2354
  default:
2907
2355
  const parsedBody = parsedOutput.body;
2908
- const $metadata = deserializeMetadata(output);
2909
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2910
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2911
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2912
- $fault: "client",
2913
- $metadata,
2356
+ (0, smithy_client_1.throwDefaultError)({
2357
+ output,
2358
+ parsedBody,
2359
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2360
+ errorCode,
2914
2361
  });
2915
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2916
2362
  }
2917
2363
  };
2918
2364
  const deserializeAws_restJson1ListProfileObjectTypeTemplatesCommand = async (output, context) => {
2919
2365
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2920
2366
  return deserializeAws_restJson1ListProfileObjectTypeTemplatesCommandError(output, context);
2921
2367
  }
2922
- const contents = {
2368
+ const contents = map({
2923
2369
  $metadata: deserializeMetadata(output),
2924
- Items: undefined,
2925
- NextToken: undefined,
2926
- };
2370
+ });
2927
2371
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2928
- if (data.Items !== undefined && data.Items !== null) {
2372
+ if (data.Items != null) {
2929
2373
  contents.Items = deserializeAws_restJson1ProfileObjectTypeTemplateList(data.Items, context);
2930
2374
  }
2931
- if (data.NextToken !== undefined && data.NextToken !== null) {
2375
+ if (data.NextToken != null) {
2932
2376
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2933
2377
  }
2934
- return Promise.resolve(contents);
2378
+ return contents;
2935
2379
  };
2936
2380
  exports.deserializeAws_restJson1ListProfileObjectTypeTemplatesCommand = deserializeAws_restJson1ListProfileObjectTypeTemplatesCommand;
2937
2381
  const deserializeAws_restJson1ListProfileObjectTypeTemplatesCommandError = async (output, context) => {
@@ -2939,7 +2383,6 @@ const deserializeAws_restJson1ListProfileObjectTypeTemplatesCommandError = async
2939
2383
  ...output,
2940
2384
  body: await parseBody(output.body, context),
2941
2385
  };
2942
- let response;
2943
2386
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2944
2387
  switch (errorCode) {
2945
2388
  case "AccessDeniedException":
@@ -2959,29 +2402,26 @@ const deserializeAws_restJson1ListProfileObjectTypeTemplatesCommandError = async
2959
2402
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2960
2403
  default:
2961
2404
  const parsedBody = parsedOutput.body;
2962
- const $metadata = deserializeMetadata(output);
2963
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2964
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2965
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2966
- $fault: "client",
2967
- $metadata,
2405
+ (0, smithy_client_1.throwDefaultError)({
2406
+ output,
2407
+ parsedBody,
2408
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2409
+ errorCode,
2968
2410
  });
2969
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2970
2411
  }
2971
2412
  };
2972
2413
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
2973
2414
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2974
2415
  return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
2975
2416
  }
2976
- const contents = {
2417
+ const contents = map({
2977
2418
  $metadata: deserializeMetadata(output),
2978
- tags: undefined,
2979
- };
2419
+ });
2980
2420
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2981
- if (data.tags !== undefined && data.tags !== null) {
2421
+ if (data.tags != null) {
2982
2422
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
2983
2423
  }
2984
- return Promise.resolve(contents);
2424
+ return contents;
2985
2425
  };
2986
2426
  exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
2987
2427
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
@@ -2989,7 +2429,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2989
2429
  ...output,
2990
2430
  body: await parseBody(output.body, context),
2991
2431
  };
2992
- let response;
2993
2432
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2994
2433
  switch (errorCode) {
2995
2434
  case "BadRequestException":
@@ -3003,33 +2442,29 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
3003
2442
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3004
2443
  default:
3005
2444
  const parsedBody = parsedOutput.body;
3006
- const $metadata = deserializeMetadata(output);
3007
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3008
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3009
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3010
- $fault: "client",
3011
- $metadata,
2445
+ (0, smithy_client_1.throwDefaultError)({
2446
+ output,
2447
+ parsedBody,
2448
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2449
+ errorCode,
3012
2450
  });
3013
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3014
2451
  }
3015
2452
  };
3016
2453
  const deserializeAws_restJson1ListWorkflowsCommand = async (output, context) => {
3017
2454
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3018
2455
  return deserializeAws_restJson1ListWorkflowsCommandError(output, context);
3019
2456
  }
3020
- const contents = {
2457
+ const contents = map({
3021
2458
  $metadata: deserializeMetadata(output),
3022
- Items: undefined,
3023
- NextToken: undefined,
3024
- };
2459
+ });
3025
2460
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3026
- if (data.Items !== undefined && data.Items !== null) {
2461
+ if (data.Items != null) {
3027
2462
  contents.Items = deserializeAws_restJson1WorkflowList(data.Items, context);
3028
2463
  }
3029
- if (data.NextToken !== undefined && data.NextToken !== null) {
2464
+ if (data.NextToken != null) {
3030
2465
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3031
2466
  }
3032
- return Promise.resolve(contents);
2467
+ return contents;
3033
2468
  };
3034
2469
  exports.deserializeAws_restJson1ListWorkflowsCommand = deserializeAws_restJson1ListWorkflowsCommand;
3035
2470
  const deserializeAws_restJson1ListWorkflowsCommandError = async (output, context) => {
@@ -3037,7 +2472,6 @@ const deserializeAws_restJson1ListWorkflowsCommandError = async (output, context
3037
2472
  ...output,
3038
2473
  body: await parseBody(output.body, context),
3039
2474
  };
3040
- let response;
3041
2475
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3042
2476
  switch (errorCode) {
3043
2477
  case "AccessDeniedException":
@@ -3057,29 +2491,26 @@ const deserializeAws_restJson1ListWorkflowsCommandError = async (output, context
3057
2491
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3058
2492
  default:
3059
2493
  const parsedBody = parsedOutput.body;
3060
- const $metadata = deserializeMetadata(output);
3061
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3062
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3063
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3064
- $fault: "client",
3065
- $metadata,
2494
+ (0, smithy_client_1.throwDefaultError)({
2495
+ output,
2496
+ parsedBody,
2497
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2498
+ errorCode,
3066
2499
  });
3067
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3068
2500
  }
3069
2501
  };
3070
2502
  const deserializeAws_restJson1MergeProfilesCommand = async (output, context) => {
3071
2503
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3072
2504
  return deserializeAws_restJson1MergeProfilesCommandError(output, context);
3073
2505
  }
3074
- const contents = {
2506
+ const contents = map({
3075
2507
  $metadata: deserializeMetadata(output),
3076
- Message: undefined,
3077
- };
2508
+ });
3078
2509
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3079
- if (data.Message !== undefined && data.Message !== null) {
2510
+ if (data.Message != null) {
3080
2511
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3081
2512
  }
3082
- return Promise.resolve(contents);
2513
+ return contents;
3083
2514
  };
3084
2515
  exports.deserializeAws_restJson1MergeProfilesCommand = deserializeAws_restJson1MergeProfilesCommand;
3085
2516
  const deserializeAws_restJson1MergeProfilesCommandError = async (output, context) => {
@@ -3087,7 +2518,6 @@ const deserializeAws_restJson1MergeProfilesCommandError = async (output, context
3087
2518
  ...output,
3088
2519
  body: await parseBody(output.body, context),
3089
2520
  };
3090
- let response;
3091
2521
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3092
2522
  switch (errorCode) {
3093
2523
  case "BadRequestException":
@@ -3104,57 +2534,47 @@ const deserializeAws_restJson1MergeProfilesCommandError = async (output, context
3104
2534
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3105
2535
  default:
3106
2536
  const parsedBody = parsedOutput.body;
3107
- const $metadata = deserializeMetadata(output);
3108
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3109
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3110
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3111
- $fault: "client",
3112
- $metadata,
2537
+ (0, smithy_client_1.throwDefaultError)({
2538
+ output,
2539
+ parsedBody,
2540
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2541
+ errorCode,
3113
2542
  });
3114
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3115
2543
  }
3116
2544
  };
3117
2545
  const deserializeAws_restJson1PutIntegrationCommand = async (output, context) => {
3118
2546
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3119
2547
  return deserializeAws_restJson1PutIntegrationCommandError(output, context);
3120
2548
  }
3121
- const contents = {
2549
+ const contents = map({
3122
2550
  $metadata: deserializeMetadata(output),
3123
- CreatedAt: undefined,
3124
- DomainName: undefined,
3125
- LastUpdatedAt: undefined,
3126
- ObjectTypeName: undefined,
3127
- ObjectTypeNames: undefined,
3128
- Tags: undefined,
3129
- Uri: undefined,
3130
- WorkflowId: undefined,
3131
- };
2551
+ });
3132
2552
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3133
- if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
2553
+ if (data.CreatedAt != null) {
3134
2554
  contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
3135
2555
  }
3136
- if (data.DomainName !== undefined && data.DomainName !== null) {
2556
+ if (data.DomainName != null) {
3137
2557
  contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
3138
2558
  }
3139
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
2559
+ if (data.LastUpdatedAt != null) {
3140
2560
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
3141
2561
  }
3142
- if (data.ObjectTypeName !== undefined && data.ObjectTypeName !== null) {
2562
+ if (data.ObjectTypeName != null) {
3143
2563
  contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
3144
2564
  }
3145
- if (data.ObjectTypeNames !== undefined && data.ObjectTypeNames !== null) {
2565
+ if (data.ObjectTypeNames != null) {
3146
2566
  contents.ObjectTypeNames = deserializeAws_restJson1ObjectTypeNames(data.ObjectTypeNames, context);
3147
2567
  }
3148
- if (data.Tags !== undefined && data.Tags !== null) {
2568
+ if (data.Tags != null) {
3149
2569
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
3150
2570
  }
3151
- if (data.Uri !== undefined && data.Uri !== null) {
2571
+ if (data.Uri != null) {
3152
2572
  contents.Uri = (0, smithy_client_1.expectString)(data.Uri);
3153
2573
  }
3154
- if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
2574
+ if (data.WorkflowId != null) {
3155
2575
  contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
3156
2576
  }
3157
- return Promise.resolve(contents);
2577
+ return contents;
3158
2578
  };
3159
2579
  exports.deserializeAws_restJson1PutIntegrationCommand = deserializeAws_restJson1PutIntegrationCommand;
3160
2580
  const deserializeAws_restJson1PutIntegrationCommandError = async (output, context) => {
@@ -3162,7 +2582,6 @@ const deserializeAws_restJson1PutIntegrationCommandError = async (output, contex
3162
2582
  ...output,
3163
2583
  body: await parseBody(output.body, context),
3164
2584
  };
3165
- let response;
3166
2585
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3167
2586
  switch (errorCode) {
3168
2587
  case "AccessDeniedException":
@@ -3182,29 +2601,26 @@ const deserializeAws_restJson1PutIntegrationCommandError = async (output, contex
3182
2601
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3183
2602
  default:
3184
2603
  const parsedBody = parsedOutput.body;
3185
- const $metadata = deserializeMetadata(output);
3186
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3187
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3188
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3189
- $fault: "client",
3190
- $metadata,
2604
+ (0, smithy_client_1.throwDefaultError)({
2605
+ output,
2606
+ parsedBody,
2607
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2608
+ errorCode,
3191
2609
  });
3192
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3193
2610
  }
3194
2611
  };
3195
2612
  const deserializeAws_restJson1PutProfileObjectCommand = async (output, context) => {
3196
2613
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3197
2614
  return deserializeAws_restJson1PutProfileObjectCommandError(output, context);
3198
2615
  }
3199
- const contents = {
2616
+ const contents = map({
3200
2617
  $metadata: deserializeMetadata(output),
3201
- ProfileObjectUniqueKey: undefined,
3202
- };
2618
+ });
3203
2619
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3204
- if (data.ProfileObjectUniqueKey !== undefined && data.ProfileObjectUniqueKey !== null) {
2620
+ if (data.ProfileObjectUniqueKey != null) {
3205
2621
  contents.ProfileObjectUniqueKey = (0, smithy_client_1.expectString)(data.ProfileObjectUniqueKey);
3206
2622
  }
3207
- return Promise.resolve(contents);
2623
+ return contents;
3208
2624
  };
3209
2625
  exports.deserializeAws_restJson1PutProfileObjectCommand = deserializeAws_restJson1PutProfileObjectCommand;
3210
2626
  const deserializeAws_restJson1PutProfileObjectCommandError = async (output, context) => {
@@ -3212,7 +2628,6 @@ const deserializeAws_restJson1PutProfileObjectCommandError = async (output, cont
3212
2628
  ...output,
3213
2629
  body: await parseBody(output.body, context),
3214
2630
  };
3215
- let response;
3216
2631
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3217
2632
  switch (errorCode) {
3218
2633
  case "AccessDeniedException":
@@ -3232,73 +2647,59 @@ const deserializeAws_restJson1PutProfileObjectCommandError = async (output, cont
3232
2647
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3233
2648
  default:
3234
2649
  const parsedBody = parsedOutput.body;
3235
- const $metadata = deserializeMetadata(output);
3236
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3237
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3238
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3239
- $fault: "client",
3240
- $metadata,
2650
+ (0, smithy_client_1.throwDefaultError)({
2651
+ output,
2652
+ parsedBody,
2653
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2654
+ errorCode,
3241
2655
  });
3242
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3243
2656
  }
3244
2657
  };
3245
2658
  const deserializeAws_restJson1PutProfileObjectTypeCommand = async (output, context) => {
3246
2659
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3247
2660
  return deserializeAws_restJson1PutProfileObjectTypeCommandError(output, context);
3248
2661
  }
3249
- const contents = {
2662
+ const contents = map({
3250
2663
  $metadata: deserializeMetadata(output),
3251
- AllowProfileCreation: undefined,
3252
- CreatedAt: undefined,
3253
- Description: undefined,
3254
- EncryptionKey: undefined,
3255
- ExpirationDays: undefined,
3256
- Fields: undefined,
3257
- Keys: undefined,
3258
- LastUpdatedAt: undefined,
3259
- ObjectTypeName: undefined,
3260
- SourceLastUpdatedTimestampFormat: undefined,
3261
- Tags: undefined,
3262
- TemplateId: undefined,
3263
- };
2664
+ });
3264
2665
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3265
- if (data.AllowProfileCreation !== undefined && data.AllowProfileCreation !== null) {
2666
+ if (data.AllowProfileCreation != null) {
3266
2667
  contents.AllowProfileCreation = (0, smithy_client_1.expectBoolean)(data.AllowProfileCreation);
3267
2668
  }
3268
- if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
2669
+ if (data.CreatedAt != null) {
3269
2670
  contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
3270
2671
  }
3271
- if (data.Description !== undefined && data.Description !== null) {
2672
+ if (data.Description != null) {
3272
2673
  contents.Description = (0, smithy_client_1.expectString)(data.Description);
3273
2674
  }
3274
- if (data.EncryptionKey !== undefined && data.EncryptionKey !== null) {
2675
+ if (data.EncryptionKey != null) {
3275
2676
  contents.EncryptionKey = (0, smithy_client_1.expectString)(data.EncryptionKey);
3276
2677
  }
3277
- if (data.ExpirationDays !== undefined && data.ExpirationDays !== null) {
2678
+ if (data.ExpirationDays != null) {
3278
2679
  contents.ExpirationDays = (0, smithy_client_1.expectInt32)(data.ExpirationDays);
3279
2680
  }
3280
- if (data.Fields !== undefined && data.Fields !== null) {
2681
+ if (data.Fields != null) {
3281
2682
  contents.Fields = deserializeAws_restJson1FieldMap(data.Fields, context);
3282
2683
  }
3283
- if (data.Keys !== undefined && data.Keys !== null) {
2684
+ if (data.Keys != null) {
3284
2685
  contents.Keys = deserializeAws_restJson1KeyMap(data.Keys, context);
3285
2686
  }
3286
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
2687
+ if (data.LastUpdatedAt != null) {
3287
2688
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
3288
2689
  }
3289
- if (data.ObjectTypeName !== undefined && data.ObjectTypeName !== null) {
2690
+ if (data.ObjectTypeName != null) {
3290
2691
  contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
3291
2692
  }
3292
- if (data.SourceLastUpdatedTimestampFormat !== undefined && data.SourceLastUpdatedTimestampFormat !== null) {
2693
+ if (data.SourceLastUpdatedTimestampFormat != null) {
3293
2694
  contents.SourceLastUpdatedTimestampFormat = (0, smithy_client_1.expectString)(data.SourceLastUpdatedTimestampFormat);
3294
2695
  }
3295
- if (data.Tags !== undefined && data.Tags !== null) {
2696
+ if (data.Tags != null) {
3296
2697
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
3297
2698
  }
3298
- if (data.TemplateId !== undefined && data.TemplateId !== null) {
2699
+ if (data.TemplateId != null) {
3299
2700
  contents.TemplateId = (0, smithy_client_1.expectString)(data.TemplateId);
3300
2701
  }
3301
- return Promise.resolve(contents);
2702
+ return contents;
3302
2703
  };
3303
2704
  exports.deserializeAws_restJson1PutProfileObjectTypeCommand = deserializeAws_restJson1PutProfileObjectTypeCommand;
3304
2705
  const deserializeAws_restJson1PutProfileObjectTypeCommandError = async (output, context) => {
@@ -3306,7 +2707,6 @@ const deserializeAws_restJson1PutProfileObjectTypeCommandError = async (output,
3306
2707
  ...output,
3307
2708
  body: await parseBody(output.body, context),
3308
2709
  };
3309
- let response;
3310
2710
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3311
2711
  switch (errorCode) {
3312
2712
  case "AccessDeniedException":
@@ -3326,33 +2726,29 @@ const deserializeAws_restJson1PutProfileObjectTypeCommandError = async (output,
3326
2726
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3327
2727
  default:
3328
2728
  const parsedBody = parsedOutput.body;
3329
- const $metadata = deserializeMetadata(output);
3330
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3331
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3332
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3333
- $fault: "client",
3334
- $metadata,
2729
+ (0, smithy_client_1.throwDefaultError)({
2730
+ output,
2731
+ parsedBody,
2732
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2733
+ errorCode,
3335
2734
  });
3336
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3337
2735
  }
3338
2736
  };
3339
2737
  const deserializeAws_restJson1SearchProfilesCommand = async (output, context) => {
3340
2738
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3341
2739
  return deserializeAws_restJson1SearchProfilesCommandError(output, context);
3342
2740
  }
3343
- const contents = {
2741
+ const contents = map({
3344
2742
  $metadata: deserializeMetadata(output),
3345
- Items: undefined,
3346
- NextToken: undefined,
3347
- };
2743
+ });
3348
2744
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3349
- if (data.Items !== undefined && data.Items !== null) {
2745
+ if (data.Items != null) {
3350
2746
  contents.Items = deserializeAws_restJson1ProfileList(data.Items, context);
3351
2747
  }
3352
- if (data.NextToken !== undefined && data.NextToken !== null) {
2748
+ if (data.NextToken != null) {
3353
2749
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3354
2750
  }
3355
- return Promise.resolve(contents);
2751
+ return contents;
3356
2752
  };
3357
2753
  exports.deserializeAws_restJson1SearchProfilesCommand = deserializeAws_restJson1SearchProfilesCommand;
3358
2754
  const deserializeAws_restJson1SearchProfilesCommandError = async (output, context) => {
@@ -3360,7 +2756,6 @@ const deserializeAws_restJson1SearchProfilesCommandError = async (output, contex
3360
2756
  ...output,
3361
2757
  body: await parseBody(output.body, context),
3362
2758
  };
3363
- let response;
3364
2759
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3365
2760
  switch (errorCode) {
3366
2761
  case "AccessDeniedException":
@@ -3380,25 +2775,23 @@ const deserializeAws_restJson1SearchProfilesCommandError = async (output, contex
3380
2775
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3381
2776
  default:
3382
2777
  const parsedBody = parsedOutput.body;
3383
- const $metadata = deserializeMetadata(output);
3384
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3385
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3386
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3387
- $fault: "client",
3388
- $metadata,
2778
+ (0, smithy_client_1.throwDefaultError)({
2779
+ output,
2780
+ parsedBody,
2781
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2782
+ errorCode,
3389
2783
  });
3390
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3391
2784
  }
3392
2785
  };
3393
2786
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
3394
2787
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3395
2788
  return deserializeAws_restJson1TagResourceCommandError(output, context);
3396
2789
  }
3397
- const contents = {
2790
+ const contents = map({
3398
2791
  $metadata: deserializeMetadata(output),
3399
- };
2792
+ });
3400
2793
  await collectBody(output.body, context);
3401
- return Promise.resolve(contents);
2794
+ return contents;
3402
2795
  };
3403
2796
  exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
3404
2797
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
@@ -3406,7 +2799,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
3406
2799
  ...output,
3407
2800
  body: await parseBody(output.body, context),
3408
2801
  };
3409
- let response;
3410
2802
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3411
2803
  switch (errorCode) {
3412
2804
  case "BadRequestException":
@@ -3420,25 +2812,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
3420
2812
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3421
2813
  default:
3422
2814
  const parsedBody = parsedOutput.body;
3423
- const $metadata = deserializeMetadata(output);
3424
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3425
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3426
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3427
- $fault: "client",
3428
- $metadata,
2815
+ (0, smithy_client_1.throwDefaultError)({
2816
+ output,
2817
+ parsedBody,
2818
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2819
+ errorCode,
3429
2820
  });
3430
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3431
2821
  }
3432
2822
  };
3433
2823
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
3434
2824
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3435
2825
  return deserializeAws_restJson1UntagResourceCommandError(output, context);
3436
2826
  }
3437
- const contents = {
2827
+ const contents = map({
3438
2828
  $metadata: deserializeMetadata(output),
3439
- };
2829
+ });
3440
2830
  await collectBody(output.body, context);
3441
- return Promise.resolve(contents);
2831
+ return contents;
3442
2832
  };
3443
2833
  exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
3444
2834
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
@@ -3446,7 +2836,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3446
2836
  ...output,
3447
2837
  body: await parseBody(output.body, context),
3448
2838
  };
3449
- let response;
3450
2839
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3451
2840
  switch (errorCode) {
3452
2841
  case "BadRequestException":
@@ -3460,57 +2849,47 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3460
2849
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3461
2850
  default:
3462
2851
  const parsedBody = parsedOutput.body;
3463
- const $metadata = deserializeMetadata(output);
3464
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3465
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3466
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3467
- $fault: "client",
3468
- $metadata,
2852
+ (0, smithy_client_1.throwDefaultError)({
2853
+ output,
2854
+ parsedBody,
2855
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2856
+ errorCode,
3469
2857
  });
3470
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3471
2858
  }
3472
2859
  };
3473
2860
  const deserializeAws_restJson1UpdateDomainCommand = async (output, context) => {
3474
2861
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3475
2862
  return deserializeAws_restJson1UpdateDomainCommandError(output, context);
3476
2863
  }
3477
- const contents = {
2864
+ const contents = map({
3478
2865
  $metadata: deserializeMetadata(output),
3479
- CreatedAt: undefined,
3480
- DeadLetterQueueUrl: undefined,
3481
- DefaultEncryptionKey: undefined,
3482
- DefaultExpirationDays: undefined,
3483
- DomainName: undefined,
3484
- LastUpdatedAt: undefined,
3485
- Matching: undefined,
3486
- Tags: undefined,
3487
- };
2866
+ });
3488
2867
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3489
- if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
2868
+ if (data.CreatedAt != null) {
3490
2869
  contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
3491
2870
  }
3492
- if (data.DeadLetterQueueUrl !== undefined && data.DeadLetterQueueUrl !== null) {
2871
+ if (data.DeadLetterQueueUrl != null) {
3493
2872
  contents.DeadLetterQueueUrl = (0, smithy_client_1.expectString)(data.DeadLetterQueueUrl);
3494
2873
  }
3495
- if (data.DefaultEncryptionKey !== undefined && data.DefaultEncryptionKey !== null) {
2874
+ if (data.DefaultEncryptionKey != null) {
3496
2875
  contents.DefaultEncryptionKey = (0, smithy_client_1.expectString)(data.DefaultEncryptionKey);
3497
2876
  }
3498
- if (data.DefaultExpirationDays !== undefined && data.DefaultExpirationDays !== null) {
2877
+ if (data.DefaultExpirationDays != null) {
3499
2878
  contents.DefaultExpirationDays = (0, smithy_client_1.expectInt32)(data.DefaultExpirationDays);
3500
2879
  }
3501
- if (data.DomainName !== undefined && data.DomainName !== null) {
2880
+ if (data.DomainName != null) {
3502
2881
  contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
3503
2882
  }
3504
- if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
2883
+ if (data.LastUpdatedAt != null) {
3505
2884
  contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
3506
2885
  }
3507
- if (data.Matching !== undefined && data.Matching !== null) {
2886
+ if (data.Matching != null) {
3508
2887
  contents.Matching = deserializeAws_restJson1MatchingResponse(data.Matching, context);
3509
2888
  }
3510
- if (data.Tags !== undefined && data.Tags !== null) {
2889
+ if (data.Tags != null) {
3511
2890
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
3512
2891
  }
3513
- return Promise.resolve(contents);
2892
+ return contents;
3514
2893
  };
3515
2894
  exports.deserializeAws_restJson1UpdateDomainCommand = deserializeAws_restJson1UpdateDomainCommand;
3516
2895
  const deserializeAws_restJson1UpdateDomainCommandError = async (output, context) => {
@@ -3518,7 +2897,6 @@ const deserializeAws_restJson1UpdateDomainCommandError = async (output, context)
3518
2897
  ...output,
3519
2898
  body: await parseBody(output.body, context),
3520
2899
  };
3521
- let response;
3522
2900
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3523
2901
  switch (errorCode) {
3524
2902
  case "AccessDeniedException":
@@ -3538,29 +2916,26 @@ const deserializeAws_restJson1UpdateDomainCommandError = async (output, context)
3538
2916
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3539
2917
  default:
3540
2918
  const parsedBody = parsedOutput.body;
3541
- const $metadata = deserializeMetadata(output);
3542
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3543
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3544
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3545
- $fault: "client",
3546
- $metadata,
2919
+ (0, smithy_client_1.throwDefaultError)({
2920
+ output,
2921
+ parsedBody,
2922
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2923
+ errorCode,
3547
2924
  });
3548
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3549
2925
  }
3550
2926
  };
3551
2927
  const deserializeAws_restJson1UpdateProfileCommand = async (output, context) => {
3552
2928
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3553
2929
  return deserializeAws_restJson1UpdateProfileCommandError(output, context);
3554
2930
  }
3555
- const contents = {
2931
+ const contents = map({
3556
2932
  $metadata: deserializeMetadata(output),
3557
- ProfileId: undefined,
3558
- };
2933
+ });
3559
2934
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3560
- if (data.ProfileId !== undefined && data.ProfileId !== null) {
2935
+ if (data.ProfileId != null) {
3561
2936
  contents.ProfileId = (0, smithy_client_1.expectString)(data.ProfileId);
3562
2937
  }
3563
- return Promise.resolve(contents);
2938
+ return contents;
3564
2939
  };
3565
2940
  exports.deserializeAws_restJson1UpdateProfileCommand = deserializeAws_restJson1UpdateProfileCommand;
3566
2941
  const deserializeAws_restJson1UpdateProfileCommandError = async (output, context) => {
@@ -3568,7 +2943,6 @@ const deserializeAws_restJson1UpdateProfileCommandError = async (output, context
3568
2943
  ...output,
3569
2944
  body: await parseBody(output.body, context),
3570
2945
  };
3571
- let response;
3572
2946
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3573
2947
  switch (errorCode) {
3574
2948
  case "AccessDeniedException":
@@ -3588,20 +2962,19 @@ const deserializeAws_restJson1UpdateProfileCommandError = async (output, context
3588
2962
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3589
2963
  default:
3590
2964
  const parsedBody = parsedOutput.body;
3591
- const $metadata = deserializeMetadata(output);
3592
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3593
- response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3594
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3595
- $fault: "client",
3596
- $metadata,
2965
+ (0, smithy_client_1.throwDefaultError)({
2966
+ output,
2967
+ parsedBody,
2968
+ exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2969
+ errorCode,
3597
2970
  });
3598
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3599
2971
  }
3600
2972
  };
2973
+ const map = smithy_client_1.map;
3601
2974
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
3602
- const contents = {};
2975
+ const contents = map({});
3603
2976
  const data = parsedOutput.body;
3604
- if (data.Message !== undefined && data.Message !== null) {
2977
+ if (data.Message != null) {
3605
2978
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3606
2979
  }
3607
2980
  const exception = new models_0_1.AccessDeniedException({
@@ -3611,9 +2984,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
3611
2984
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3612
2985
  };
3613
2986
  const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
3614
- const contents = {};
2987
+ const contents = map({});
3615
2988
  const data = parsedOutput.body;
3616
- if (data.Message !== undefined && data.Message !== null) {
2989
+ if (data.Message != null) {
3617
2990
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3618
2991
  }
3619
2992
  const exception = new models_0_1.BadRequestException({
@@ -3623,9 +2996,9 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
3623
2996
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3624
2997
  };
3625
2998
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
3626
- const contents = {};
2999
+ const contents = map({});
3627
3000
  const data = parsedOutput.body;
3628
- if (data.Message !== undefined && data.Message !== null) {
3001
+ if (data.Message != null) {
3629
3002
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3630
3003
  }
3631
3004
  const exception = new models_0_1.InternalServerException({
@@ -3635,9 +3008,9 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
3635
3008
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3636
3009
  };
3637
3010
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
3638
- const contents = {};
3011
+ const contents = map({});
3639
3012
  const data = parsedOutput.body;
3640
- if (data.Message !== undefined && data.Message !== null) {
3013
+ if (data.Message != null) {
3641
3014
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3642
3015
  }
3643
3016
  const exception = new models_0_1.ResourceNotFoundException({
@@ -3647,9 +3020,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
3647
3020
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3648
3021
  };
3649
3022
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
3650
- const contents = {};
3023
+ const contents = map({});
3651
3024
  const data = parsedOutput.body;
3652
- if (data.Message !== undefined && data.Message !== null) {
3025
+ if (data.Message != null) {
3653
3026
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
3654
3027
  }
3655
3028
  const exception = new models_0_1.ThrottlingException({
@@ -3726,9 +3099,6 @@ const serializeAws_restJson1Batches = (input, context) => {
3726
3099
  return input
3727
3100
  .filter((e) => e != null)
3728
3101
  .map((entry) => {
3729
- if (entry === null) {
3730
- return null;
3731
- }
3732
3102
  return serializeAws_restJson1Batch(entry, context);
3733
3103
  });
3734
3104
  };
@@ -3776,9 +3146,6 @@ const serializeAws_restJson1FieldNameList = (input, context) => {
3776
3146
  return input
3777
3147
  .filter((e) => e != null)
3778
3148
  .map((entry) => {
3779
- if (entry === null) {
3780
- return null;
3781
- }
3782
3149
  return entry;
3783
3150
  });
3784
3151
  };
@@ -3861,9 +3228,6 @@ const serializeAws_restJson1MatchingAttributes = (input, context) => {
3861
3228
  return input
3862
3229
  .filter((e) => e != null)
3863
3230
  .map((entry) => {
3864
- if (entry === null) {
3865
- return null;
3866
- }
3867
3231
  return entry;
3868
3232
  });
3869
3233
  };
@@ -3871,9 +3235,6 @@ const serializeAws_restJson1MatchingAttributesList = (input, context) => {
3871
3235
  return input
3872
3236
  .filter((e) => e != null)
3873
3237
  .map((entry) => {
3874
- if (entry === null) {
3875
- return null;
3876
- }
3877
3238
  return serializeAws_restJson1MatchingAttributes(entry, context);
3878
3239
  });
3879
3240
  };
@@ -3912,9 +3273,6 @@ const serializeAws_restJson1ObjectTypeKeyList = (input, context) => {
3912
3273
  return input
3913
3274
  .filter((e) => e != null)
3914
3275
  .map((entry) => {
3915
- if (entry === null) {
3916
- return null;
3917
- }
3918
3276
  return serializeAws_restJson1ObjectTypeKey(entry, context);
3919
3277
  });
3920
3278
  };
@@ -3933,9 +3291,6 @@ const serializeAws_restJson1ProfileIdToBeMergedList = (input, context) => {
3933
3291
  return input
3934
3292
  .filter((e) => e != null)
3935
3293
  .map((entry) => {
3936
- if (entry === null) {
3937
- return null;
3938
- }
3939
3294
  return entry;
3940
3295
  });
3941
3296
  };
@@ -3943,9 +3298,6 @@ const serializeAws_restJson1requestValueList = (input, context) => {
3943
3298
  return input
3944
3299
  .filter((e) => e != null)
3945
3300
  .map((entry) => {
3946
- if (entry === null) {
3947
- return null;
3948
- }
3949
3301
  return entry;
3950
3302
  });
3951
3303
  };
@@ -4003,9 +3355,6 @@ const serializeAws_restJson1SourceFields = (input, context) => {
4003
3355
  return input
4004
3356
  .filter((e) => e != null)
4005
3357
  .map((entry) => {
4006
- if (entry === null) {
4007
- return null;
4008
- }
4009
3358
  return entry;
4010
3359
  });
4011
3360
  };
@@ -4025,9 +3374,6 @@ const serializeAws_restJson1StandardIdentifierList = (input, context) => {
4025
3374
  return input
4026
3375
  .filter((e) => e != null)
4027
3376
  .map((entry) => {
4028
- if (entry === null) {
4029
- return null;
4030
- }
4031
3377
  return entry;
4032
3378
  });
4033
3379
  };
@@ -4072,9 +3418,6 @@ const serializeAws_restJson1Tasks = (input, context) => {
4072
3418
  return input
4073
3419
  .filter((e) => e != null)
4074
3420
  .map((entry) => {
4075
- if (entry === null) {
4076
- return null;
4077
- }
4078
3421
  return serializeAws_restJson1Task(entry, context);
4079
3422
  });
4080
3423
  };