@aws-sdk/client-groundstation 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 (59) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/commands/CancelContactCommand.js +2 -2
  4. package/dist-cjs/commands/CreateConfigCommand.js +2 -2
  5. package/dist-cjs/commands/CreateDataflowEndpointGroupCommand.js +2 -2
  6. package/dist-cjs/commands/CreateMissionProfileCommand.js +2 -2
  7. package/dist-cjs/commands/DeleteConfigCommand.js +2 -2
  8. package/dist-cjs/commands/DeleteDataflowEndpointGroupCommand.js +2 -2
  9. package/dist-cjs/commands/DeleteMissionProfileCommand.js +2 -2
  10. package/dist-cjs/commands/DescribeContactCommand.js +2 -2
  11. package/dist-cjs/commands/GetConfigCommand.js +2 -2
  12. package/dist-cjs/commands/GetDataflowEndpointGroupCommand.js +2 -2
  13. package/dist-cjs/commands/GetMinuteUsageCommand.js +2 -2
  14. package/dist-cjs/commands/GetMissionProfileCommand.js +2 -2
  15. package/dist-cjs/commands/GetSatelliteCommand.js +2 -2
  16. package/dist-cjs/commands/ListConfigsCommand.js +2 -2
  17. package/dist-cjs/commands/ListContactsCommand.js +2 -2
  18. package/dist-cjs/commands/ListDataflowEndpointGroupsCommand.js +2 -2
  19. package/dist-cjs/commands/ListGroundStationsCommand.js +2 -2
  20. package/dist-cjs/commands/ListMissionProfilesCommand.js +2 -2
  21. package/dist-cjs/commands/ListSatellitesCommand.js +2 -2
  22. package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
  23. package/dist-cjs/commands/ReserveContactCommand.js +2 -2
  24. package/dist-cjs/commands/TagResourceCommand.js +2 -2
  25. package/dist-cjs/commands/UntagResourceCommand.js +2 -2
  26. package/dist-cjs/commands/UpdateConfigCommand.js +2 -2
  27. package/dist-cjs/commands/UpdateMissionProfileCommand.js +2 -2
  28. package/dist-cjs/models/models_0.js +338 -484
  29. package/dist-cjs/protocols/Aws_restJson1.js +335 -652
  30. package/dist-es/commands/CancelContactCommand.js +3 -3
  31. package/dist-es/commands/CreateConfigCommand.js +3 -3
  32. package/dist-es/commands/CreateDataflowEndpointGroupCommand.js +3 -3
  33. package/dist-es/commands/CreateMissionProfileCommand.js +3 -3
  34. package/dist-es/commands/DeleteConfigCommand.js +3 -3
  35. package/dist-es/commands/DeleteDataflowEndpointGroupCommand.js +3 -3
  36. package/dist-es/commands/DeleteMissionProfileCommand.js +3 -3
  37. package/dist-es/commands/DescribeContactCommand.js +3 -3
  38. package/dist-es/commands/GetConfigCommand.js +3 -3
  39. package/dist-es/commands/GetDataflowEndpointGroupCommand.js +3 -3
  40. package/dist-es/commands/GetMinuteUsageCommand.js +3 -3
  41. package/dist-es/commands/GetMissionProfileCommand.js +3 -3
  42. package/dist-es/commands/GetSatelliteCommand.js +3 -3
  43. package/dist-es/commands/ListConfigsCommand.js +3 -3
  44. package/dist-es/commands/ListContactsCommand.js +3 -3
  45. package/dist-es/commands/ListDataflowEndpointGroupsCommand.js +3 -3
  46. package/dist-es/commands/ListGroundStationsCommand.js +3 -3
  47. package/dist-es/commands/ListMissionProfilesCommand.js +3 -3
  48. package/dist-es/commands/ListSatellitesCommand.js +3 -3
  49. package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
  50. package/dist-es/commands/ReserveContactCommand.js +3 -3
  51. package/dist-es/commands/TagResourceCommand.js +3 -3
  52. package/dist-es/commands/UntagResourceCommand.js +3 -3
  53. package/dist-es/commands/UpdateConfigCommand.js +3 -3
  54. package/dist-es/commands/UpdateMissionProfileCommand.js +3 -3
  55. package/dist-es/models/models_0.js +106 -328
  56. package/dist-es/protocols/Aws_restJson1.js +425 -649
  57. package/dist-types/models/models_0.d.ts +304 -452
  58. package/dist-types/ts3.4/models/models_0.d.ts +152 -300
  59. package/package.json +6 -6
@@ -9,16 +9,7 @@ const serializeAws_restJson1CancelContactCommand = async (input, context) => {
9
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
10
  const headers = {};
11
11
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/{contactId}";
12
- if (input.contactId !== undefined) {
13
- const labelValue = input.contactId;
14
- if (labelValue.length <= 0) {
15
- throw new Error("Empty value provided for input HTTP label: contactId.");
16
- }
17
- resolvedPath = resolvedPath.replace("{contactId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
18
- }
19
- else {
20
- throw new Error("No value provided for input HTTP label: contactId.");
21
- }
12
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "contactId", () => input.contactId, "{contactId}", false);
22
13
  let body;
23
14
  return new protocol_http_1.HttpRequest({
24
15
  protocol,
@@ -117,26 +108,8 @@ const serializeAws_restJson1DeleteConfigCommand = async (input, context) => {
117
108
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
109
  const headers = {};
119
110
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/config/{configType}/{configId}";
120
- if (input.configId !== undefined) {
121
- const labelValue = input.configId;
122
- if (labelValue.length <= 0) {
123
- throw new Error("Empty value provided for input HTTP label: configId.");
124
- }
125
- resolvedPath = resolvedPath.replace("{configId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
126
- }
127
- else {
128
- throw new Error("No value provided for input HTTP label: configId.");
129
- }
130
- if (input.configType !== undefined) {
131
- const labelValue = input.configType;
132
- if (labelValue.length <= 0) {
133
- throw new Error("Empty value provided for input HTTP label: configType.");
134
- }
135
- resolvedPath = resolvedPath.replace("{configType}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
136
- }
137
- else {
138
- throw new Error("No value provided for input HTTP label: configType.");
139
- }
111
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "configId", () => input.configId, "{configId}", false);
112
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "configType", () => input.configType, "{configType}", false);
140
113
  let body;
141
114
  return new protocol_http_1.HttpRequest({
142
115
  protocol,
@@ -154,16 +127,7 @@ const serializeAws_restJson1DeleteDataflowEndpointGroupCommand = async (input, c
154
127
  const headers = {};
155
128
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
156
129
  "/dataflowEndpointGroup/{dataflowEndpointGroupId}";
157
- if (input.dataflowEndpointGroupId !== undefined) {
158
- const labelValue = input.dataflowEndpointGroupId;
159
- if (labelValue.length <= 0) {
160
- throw new Error("Empty value provided for input HTTP label: dataflowEndpointGroupId.");
161
- }
162
- resolvedPath = resolvedPath.replace("{dataflowEndpointGroupId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
163
- }
164
- else {
165
- throw new Error("No value provided for input HTTP label: dataflowEndpointGroupId.");
166
- }
130
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataflowEndpointGroupId", () => input.dataflowEndpointGroupId, "{dataflowEndpointGroupId}", false);
167
131
  let body;
168
132
  return new protocol_http_1.HttpRequest({
169
133
  protocol,
@@ -180,16 +144,7 @@ const serializeAws_restJson1DeleteMissionProfileCommand = async (input, context)
180
144
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
145
  const headers = {};
182
146
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile/{missionProfileId}";
183
- if (input.missionProfileId !== undefined) {
184
- const labelValue = input.missionProfileId;
185
- if (labelValue.length <= 0) {
186
- throw new Error("Empty value provided for input HTTP label: missionProfileId.");
187
- }
188
- resolvedPath = resolvedPath.replace("{missionProfileId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
189
- }
190
- else {
191
- throw new Error("No value provided for input HTTP label: missionProfileId.");
192
- }
147
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "missionProfileId", () => input.missionProfileId, "{missionProfileId}", false);
193
148
  let body;
194
149
  return new protocol_http_1.HttpRequest({
195
150
  protocol,
@@ -206,16 +161,7 @@ const serializeAws_restJson1DescribeContactCommand = async (input, context) => {
206
161
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
207
162
  const headers = {};
208
163
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/contact/{contactId}";
209
- if (input.contactId !== undefined) {
210
- const labelValue = input.contactId;
211
- if (labelValue.length <= 0) {
212
- throw new Error("Empty value provided for input HTTP label: contactId.");
213
- }
214
- resolvedPath = resolvedPath.replace("{contactId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
215
- }
216
- else {
217
- throw new Error("No value provided for input HTTP label: contactId.");
218
- }
164
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "contactId", () => input.contactId, "{contactId}", false);
219
165
  let body;
220
166
  return new protocol_http_1.HttpRequest({
221
167
  protocol,
@@ -232,26 +178,8 @@ const serializeAws_restJson1GetConfigCommand = async (input, context) => {
232
178
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
179
  const headers = {};
234
180
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/config/{configType}/{configId}";
235
- if (input.configId !== undefined) {
236
- const labelValue = input.configId;
237
- if (labelValue.length <= 0) {
238
- throw new Error("Empty value provided for input HTTP label: configId.");
239
- }
240
- resolvedPath = resolvedPath.replace("{configId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
241
- }
242
- else {
243
- throw new Error("No value provided for input HTTP label: configId.");
244
- }
245
- if (input.configType !== undefined) {
246
- const labelValue = input.configType;
247
- if (labelValue.length <= 0) {
248
- throw new Error("Empty value provided for input HTTP label: configType.");
249
- }
250
- resolvedPath = resolvedPath.replace("{configType}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
251
- }
252
- else {
253
- throw new Error("No value provided for input HTTP label: configType.");
254
- }
181
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "configId", () => input.configId, "{configId}", false);
182
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "configType", () => input.configType, "{configType}", false);
255
183
  let body;
256
184
  return new protocol_http_1.HttpRequest({
257
185
  protocol,
@@ -269,16 +197,7 @@ const serializeAws_restJson1GetDataflowEndpointGroupCommand = async (input, cont
269
197
  const headers = {};
270
198
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
271
199
  "/dataflowEndpointGroup/{dataflowEndpointGroupId}";
272
- if (input.dataflowEndpointGroupId !== undefined) {
273
- const labelValue = input.dataflowEndpointGroupId;
274
- if (labelValue.length <= 0) {
275
- throw new Error("Empty value provided for input HTTP label: dataflowEndpointGroupId.");
276
- }
277
- resolvedPath = resolvedPath.replace("{dataflowEndpointGroupId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
278
- }
279
- else {
280
- throw new Error("No value provided for input HTTP label: dataflowEndpointGroupId.");
281
- }
200
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "dataflowEndpointGroupId", () => input.dataflowEndpointGroupId, "{dataflowEndpointGroupId}", false);
282
201
  let body;
283
202
  return new protocol_http_1.HttpRequest({
284
203
  protocol,
@@ -317,16 +236,7 @@ const serializeAws_restJson1GetMissionProfileCommand = async (input, context) =>
317
236
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
318
237
  const headers = {};
319
238
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile/{missionProfileId}";
320
- if (input.missionProfileId !== undefined) {
321
- const labelValue = input.missionProfileId;
322
- if (labelValue.length <= 0) {
323
- throw new Error("Empty value provided for input HTTP label: missionProfileId.");
324
- }
325
- resolvedPath = resolvedPath.replace("{missionProfileId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
326
- }
327
- else {
328
- throw new Error("No value provided for input HTTP label: missionProfileId.");
329
- }
239
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "missionProfileId", () => input.missionProfileId, "{missionProfileId}", false);
330
240
  let body;
331
241
  return new protocol_http_1.HttpRequest({
332
242
  protocol,
@@ -343,16 +253,7 @@ const serializeAws_restJson1GetSatelliteCommand = async (input, context) => {
343
253
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
344
254
  const headers = {};
345
255
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/satellite/{satelliteId}";
346
- if (input.satelliteId !== undefined) {
347
- const labelValue = input.satelliteId;
348
- if (labelValue.length <= 0) {
349
- throw new Error("Empty value provided for input HTTP label: satelliteId.");
350
- }
351
- resolvedPath = resolvedPath.replace("{satelliteId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
352
- }
353
- else {
354
- throw new Error("No value provided for input HTTP label: satelliteId.");
355
- }
256
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "satelliteId", () => input.satelliteId, "{satelliteId}", false);
356
257
  let body;
357
258
  return new protocol_http_1.HttpRequest({
358
259
  protocol,
@@ -369,10 +270,10 @@ const serializeAws_restJson1ListConfigsCommand = async (input, context) => {
369
270
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
370
271
  const headers = {};
371
272
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/config";
372
- const query = {
373
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
374
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
375
- };
273
+ const query = map({
274
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
275
+ nextToken: [, input.nextToken],
276
+ });
376
277
  let body;
377
278
  return new protocol_http_1.HttpRequest({
378
279
  protocol,
@@ -418,10 +319,10 @@ const serializeAws_restJson1ListDataflowEndpointGroupsCommand = async (input, co
418
319
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
419
320
  const headers = {};
420
321
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/dataflowEndpointGroup";
421
- const query = {
422
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
423
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
424
- };
322
+ const query = map({
323
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
324
+ nextToken: [, input.nextToken],
325
+ });
425
326
  let body;
426
327
  return new protocol_http_1.HttpRequest({
427
328
  protocol,
@@ -439,11 +340,11 @@ const serializeAws_restJson1ListGroundStationsCommand = async (input, context) =
439
340
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
440
341
  const headers = {};
441
342
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/groundstation";
442
- const query = {
443
- ...(input.satelliteId !== undefined && { satelliteId: input.satelliteId }),
444
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
445
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
446
- };
343
+ const query = map({
344
+ satelliteId: [, input.satelliteId],
345
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
346
+ nextToken: [, input.nextToken],
347
+ });
447
348
  let body;
448
349
  return new protocol_http_1.HttpRequest({
449
350
  protocol,
@@ -461,10 +362,10 @@ const serializeAws_restJson1ListMissionProfilesCommand = async (input, context)
461
362
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
462
363
  const headers = {};
463
364
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile";
464
- const query = {
465
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
466
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
467
- };
365
+ const query = map({
366
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
367
+ nextToken: [, input.nextToken],
368
+ });
468
369
  let body;
469
370
  return new protocol_http_1.HttpRequest({
470
371
  protocol,
@@ -482,10 +383,10 @@ const serializeAws_restJson1ListSatellitesCommand = async (input, context) => {
482
383
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
483
384
  const headers = {};
484
385
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/satellite";
485
- const query = {
486
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
487
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
488
- };
386
+ const query = map({
387
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
388
+ nextToken: [, input.nextToken],
389
+ });
489
390
  let body;
490
391
  return new protocol_http_1.HttpRequest({
491
392
  protocol,
@@ -503,16 +404,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
503
404
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
504
405
  const headers = {};
505
406
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
506
- if (input.resourceArn !== undefined) {
507
- const labelValue = input.resourceArn;
508
- if (labelValue.length <= 0) {
509
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
510
- }
511
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
512
- }
513
- else {
514
- throw new Error("No value provided for input HTTP label: resourceArn.");
515
- }
407
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
516
408
  let body;
517
409
  return new protocol_http_1.HttpRequest({
518
410
  protocol,
@@ -557,16 +449,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
557
449
  "content-type": "application/json",
558
450
  };
559
451
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
560
- if (input.resourceArn !== undefined) {
561
- const labelValue = input.resourceArn;
562
- if (labelValue.length <= 0) {
563
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
564
- }
565
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
566
- }
567
- else {
568
- throw new Error("No value provided for input HTTP label: resourceArn.");
569
- }
452
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
570
453
  let body;
571
454
  body = JSON.stringify({
572
455
  ...(input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
@@ -586,19 +469,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
586
469
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
587
470
  const headers = {};
588
471
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
589
- if (input.resourceArn !== undefined) {
590
- const labelValue = input.resourceArn;
591
- if (labelValue.length <= 0) {
592
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
593
- }
594
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
595
- }
596
- else {
597
- throw new Error("No value provided for input HTTP label: resourceArn.");
598
- }
599
- const query = {
600
- ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry) }),
601
- };
472
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
473
+ const query = map({
474
+ tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
475
+ });
602
476
  let body;
603
477
  return new protocol_http_1.HttpRequest({
604
478
  protocol,
@@ -618,26 +492,8 @@ const serializeAws_restJson1UpdateConfigCommand = async (input, context) => {
618
492
  "content-type": "application/json",
619
493
  };
620
494
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/config/{configType}/{configId}";
621
- if (input.configId !== undefined) {
622
- const labelValue = input.configId;
623
- if (labelValue.length <= 0) {
624
- throw new Error("Empty value provided for input HTTP label: configId.");
625
- }
626
- resolvedPath = resolvedPath.replace("{configId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
627
- }
628
- else {
629
- throw new Error("No value provided for input HTTP label: configId.");
630
- }
631
- if (input.configType !== undefined) {
632
- const labelValue = input.configType;
633
- if (labelValue.length <= 0) {
634
- throw new Error("Empty value provided for input HTTP label: configType.");
635
- }
636
- resolvedPath = resolvedPath.replace("{configType}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
637
- }
638
- else {
639
- throw new Error("No value provided for input HTTP label: configType.");
640
- }
495
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "configId", () => input.configId, "{configId}", false);
496
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "configType", () => input.configType, "{configType}", false);
641
497
  let body;
642
498
  body = JSON.stringify({
643
499
  ...(input.configData != null && { configData: serializeAws_restJson1ConfigTypeData(input.configData, context) }),
@@ -660,16 +516,7 @@ const serializeAws_restJson1UpdateMissionProfileCommand = async (input, context)
660
516
  "content-type": "application/json",
661
517
  };
662
518
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile/{missionProfileId}";
663
- if (input.missionProfileId !== undefined) {
664
- const labelValue = input.missionProfileId;
665
- if (labelValue.length <= 0) {
666
- throw new Error("Empty value provided for input HTTP label: missionProfileId.");
667
- }
668
- resolvedPath = resolvedPath.replace("{missionProfileId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
669
- }
670
- else {
671
- throw new Error("No value provided for input HTTP label: missionProfileId.");
672
- }
519
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "missionProfileId", () => input.missionProfileId, "{missionProfileId}", false);
673
520
  let body;
674
521
  body = JSON.stringify({
675
522
  ...(input.contactPostPassDurationSeconds != null && {
@@ -702,15 +549,14 @@ const deserializeAws_restJson1CancelContactCommand = async (output, context) =>
702
549
  if (output.statusCode !== 200 && output.statusCode >= 300) {
703
550
  return deserializeAws_restJson1CancelContactCommandError(output, context);
704
551
  }
705
- const contents = {
552
+ const contents = map({
706
553
  $metadata: deserializeMetadata(output),
707
- contactId: undefined,
708
- };
554
+ });
709
555
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
710
- if (data.contactId !== undefined && data.contactId !== null) {
556
+ if (data.contactId != null) {
711
557
  contents.contactId = (0, smithy_client_1.expectString)(data.contactId);
712
558
  }
713
- return Promise.resolve(contents);
559
+ return contents;
714
560
  };
715
561
  exports.deserializeAws_restJson1CancelContactCommand = deserializeAws_restJson1CancelContactCommand;
716
562
  const deserializeAws_restJson1CancelContactCommandError = async (output, context) => {
@@ -718,7 +564,6 @@ const deserializeAws_restJson1CancelContactCommandError = async (output, context
718
564
  ...output,
719
565
  body: await parseBody(output.body, context),
720
566
  };
721
- let response;
722
567
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
723
568
  switch (errorCode) {
724
569
  case "DependencyException":
@@ -732,37 +577,32 @@ const deserializeAws_restJson1CancelContactCommandError = async (output, context
732
577
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
733
578
  default:
734
579
  const parsedBody = parsedOutput.body;
735
- const $metadata = deserializeMetadata(output);
736
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
737
- response = new GroundStationServiceException_1.GroundStationServiceException({
738
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
739
- $fault: "client",
740
- $metadata,
580
+ (0, smithy_client_1.throwDefaultError)({
581
+ output,
582
+ parsedBody,
583
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
584
+ errorCode,
741
585
  });
742
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
743
586
  }
744
587
  };
745
588
  const deserializeAws_restJson1CreateConfigCommand = async (output, context) => {
746
589
  if (output.statusCode !== 200 && output.statusCode >= 300) {
747
590
  return deserializeAws_restJson1CreateConfigCommandError(output, context);
748
591
  }
749
- const contents = {
592
+ const contents = map({
750
593
  $metadata: deserializeMetadata(output),
751
- configArn: undefined,
752
- configId: undefined,
753
- configType: undefined,
754
- };
594
+ });
755
595
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
756
- if (data.configArn !== undefined && data.configArn !== null) {
596
+ if (data.configArn != null) {
757
597
  contents.configArn = (0, smithy_client_1.expectString)(data.configArn);
758
598
  }
759
- if (data.configId !== undefined && data.configId !== null) {
599
+ if (data.configId != null) {
760
600
  contents.configId = (0, smithy_client_1.expectString)(data.configId);
761
601
  }
762
- if (data.configType !== undefined && data.configType !== null) {
602
+ if (data.configType != null) {
763
603
  contents.configType = (0, smithy_client_1.expectString)(data.configType);
764
604
  }
765
- return Promise.resolve(contents);
605
+ return contents;
766
606
  };
767
607
  exports.deserializeAws_restJson1CreateConfigCommand = deserializeAws_restJson1CreateConfigCommand;
768
608
  const deserializeAws_restJson1CreateConfigCommandError = async (output, context) => {
@@ -770,7 +610,6 @@ const deserializeAws_restJson1CreateConfigCommandError = async (output, context)
770
610
  ...output,
771
611
  body: await parseBody(output.body, context),
772
612
  };
773
- let response;
774
613
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
775
614
  switch (errorCode) {
776
615
  case "DependencyException":
@@ -787,29 +626,26 @@ const deserializeAws_restJson1CreateConfigCommandError = async (output, context)
787
626
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
788
627
  default:
789
628
  const parsedBody = parsedOutput.body;
790
- const $metadata = deserializeMetadata(output);
791
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
792
- response = new GroundStationServiceException_1.GroundStationServiceException({
793
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
794
- $fault: "client",
795
- $metadata,
629
+ (0, smithy_client_1.throwDefaultError)({
630
+ output,
631
+ parsedBody,
632
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
633
+ errorCode,
796
634
  });
797
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
798
635
  }
799
636
  };
800
637
  const deserializeAws_restJson1CreateDataflowEndpointGroupCommand = async (output, context) => {
801
638
  if (output.statusCode !== 200 && output.statusCode >= 300) {
802
639
  return deserializeAws_restJson1CreateDataflowEndpointGroupCommandError(output, context);
803
640
  }
804
- const contents = {
641
+ const contents = map({
805
642
  $metadata: deserializeMetadata(output),
806
- dataflowEndpointGroupId: undefined,
807
- };
643
+ });
808
644
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
809
- if (data.dataflowEndpointGroupId !== undefined && data.dataflowEndpointGroupId !== null) {
645
+ if (data.dataflowEndpointGroupId != null) {
810
646
  contents.dataflowEndpointGroupId = (0, smithy_client_1.expectString)(data.dataflowEndpointGroupId);
811
647
  }
812
- return Promise.resolve(contents);
648
+ return contents;
813
649
  };
814
650
  exports.deserializeAws_restJson1CreateDataflowEndpointGroupCommand = deserializeAws_restJson1CreateDataflowEndpointGroupCommand;
815
651
  const deserializeAws_restJson1CreateDataflowEndpointGroupCommandError = async (output, context) => {
@@ -817,7 +653,6 @@ const deserializeAws_restJson1CreateDataflowEndpointGroupCommandError = async (o
817
653
  ...output,
818
654
  body: await parseBody(output.body, context),
819
655
  };
820
- let response;
821
656
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
822
657
  switch (errorCode) {
823
658
  case "DependencyException":
@@ -831,29 +666,26 @@ const deserializeAws_restJson1CreateDataflowEndpointGroupCommandError = async (o
831
666
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
832
667
  default:
833
668
  const parsedBody = parsedOutput.body;
834
- const $metadata = deserializeMetadata(output);
835
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
836
- response = new GroundStationServiceException_1.GroundStationServiceException({
837
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
838
- $fault: "client",
839
- $metadata,
669
+ (0, smithy_client_1.throwDefaultError)({
670
+ output,
671
+ parsedBody,
672
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
673
+ errorCode,
840
674
  });
841
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
842
675
  }
843
676
  };
844
677
  const deserializeAws_restJson1CreateMissionProfileCommand = async (output, context) => {
845
678
  if (output.statusCode !== 200 && output.statusCode >= 300) {
846
679
  return deserializeAws_restJson1CreateMissionProfileCommandError(output, context);
847
680
  }
848
- const contents = {
681
+ const contents = map({
849
682
  $metadata: deserializeMetadata(output),
850
- missionProfileId: undefined,
851
- };
683
+ });
852
684
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
853
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
685
+ if (data.missionProfileId != null) {
854
686
  contents.missionProfileId = (0, smithy_client_1.expectString)(data.missionProfileId);
855
687
  }
856
- return Promise.resolve(contents);
688
+ return contents;
857
689
  };
858
690
  exports.deserializeAws_restJson1CreateMissionProfileCommand = deserializeAws_restJson1CreateMissionProfileCommand;
859
691
  const deserializeAws_restJson1CreateMissionProfileCommandError = async (output, context) => {
@@ -861,7 +693,6 @@ const deserializeAws_restJson1CreateMissionProfileCommandError = async (output,
861
693
  ...output,
862
694
  body: await parseBody(output.body, context),
863
695
  };
864
- let response;
865
696
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
697
  switch (errorCode) {
867
698
  case "DependencyException":
@@ -875,37 +706,32 @@ const deserializeAws_restJson1CreateMissionProfileCommandError = async (output,
875
706
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
876
707
  default:
877
708
  const parsedBody = parsedOutput.body;
878
- const $metadata = deserializeMetadata(output);
879
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
880
- response = new GroundStationServiceException_1.GroundStationServiceException({
881
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
882
- $fault: "client",
883
- $metadata,
709
+ (0, smithy_client_1.throwDefaultError)({
710
+ output,
711
+ parsedBody,
712
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
713
+ errorCode,
884
714
  });
885
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
886
715
  }
887
716
  };
888
717
  const deserializeAws_restJson1DeleteConfigCommand = async (output, context) => {
889
718
  if (output.statusCode !== 200 && output.statusCode >= 300) {
890
719
  return deserializeAws_restJson1DeleteConfigCommandError(output, context);
891
720
  }
892
- const contents = {
721
+ const contents = map({
893
722
  $metadata: deserializeMetadata(output),
894
- configArn: undefined,
895
- configId: undefined,
896
- configType: undefined,
897
- };
723
+ });
898
724
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
899
- if (data.configArn !== undefined && data.configArn !== null) {
725
+ if (data.configArn != null) {
900
726
  contents.configArn = (0, smithy_client_1.expectString)(data.configArn);
901
727
  }
902
- if (data.configId !== undefined && data.configId !== null) {
728
+ if (data.configId != null) {
903
729
  contents.configId = (0, smithy_client_1.expectString)(data.configId);
904
730
  }
905
- if (data.configType !== undefined && data.configType !== null) {
731
+ if (data.configType != null) {
906
732
  contents.configType = (0, smithy_client_1.expectString)(data.configType);
907
733
  }
908
- return Promise.resolve(contents);
734
+ return contents;
909
735
  };
910
736
  exports.deserializeAws_restJson1DeleteConfigCommand = deserializeAws_restJson1DeleteConfigCommand;
911
737
  const deserializeAws_restJson1DeleteConfigCommandError = async (output, context) => {
@@ -913,7 +739,6 @@ const deserializeAws_restJson1DeleteConfigCommandError = async (output, context)
913
739
  ...output,
914
740
  body: await parseBody(output.body, context),
915
741
  };
916
- let response;
917
742
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
918
743
  switch (errorCode) {
919
744
  case "DependencyException":
@@ -927,29 +752,26 @@ const deserializeAws_restJson1DeleteConfigCommandError = async (output, context)
927
752
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
928
753
  default:
929
754
  const parsedBody = parsedOutput.body;
930
- const $metadata = deserializeMetadata(output);
931
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
932
- response = new GroundStationServiceException_1.GroundStationServiceException({
933
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
934
- $fault: "client",
935
- $metadata,
755
+ (0, smithy_client_1.throwDefaultError)({
756
+ output,
757
+ parsedBody,
758
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
759
+ errorCode,
936
760
  });
937
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
938
761
  }
939
762
  };
940
763
  const deserializeAws_restJson1DeleteDataflowEndpointGroupCommand = async (output, context) => {
941
764
  if (output.statusCode !== 200 && output.statusCode >= 300) {
942
765
  return deserializeAws_restJson1DeleteDataflowEndpointGroupCommandError(output, context);
943
766
  }
944
- const contents = {
767
+ const contents = map({
945
768
  $metadata: deserializeMetadata(output),
946
- dataflowEndpointGroupId: undefined,
947
- };
769
+ });
948
770
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
949
- if (data.dataflowEndpointGroupId !== undefined && data.dataflowEndpointGroupId !== null) {
771
+ if (data.dataflowEndpointGroupId != null) {
950
772
  contents.dataflowEndpointGroupId = (0, smithy_client_1.expectString)(data.dataflowEndpointGroupId);
951
773
  }
952
- return Promise.resolve(contents);
774
+ return contents;
953
775
  };
954
776
  exports.deserializeAws_restJson1DeleteDataflowEndpointGroupCommand = deserializeAws_restJson1DeleteDataflowEndpointGroupCommand;
955
777
  const deserializeAws_restJson1DeleteDataflowEndpointGroupCommandError = async (output, context) => {
@@ -957,7 +779,6 @@ const deserializeAws_restJson1DeleteDataflowEndpointGroupCommandError = async (o
957
779
  ...output,
958
780
  body: await parseBody(output.body, context),
959
781
  };
960
- let response;
961
782
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
962
783
  switch (errorCode) {
963
784
  case "DependencyException":
@@ -971,29 +792,26 @@ const deserializeAws_restJson1DeleteDataflowEndpointGroupCommandError = async (o
971
792
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
972
793
  default:
973
794
  const parsedBody = parsedOutput.body;
974
- const $metadata = deserializeMetadata(output);
975
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
976
- response = new GroundStationServiceException_1.GroundStationServiceException({
977
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
978
- $fault: "client",
979
- $metadata,
795
+ (0, smithy_client_1.throwDefaultError)({
796
+ output,
797
+ parsedBody,
798
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
799
+ errorCode,
980
800
  });
981
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
982
801
  }
983
802
  };
984
803
  const deserializeAws_restJson1DeleteMissionProfileCommand = async (output, context) => {
985
804
  if (output.statusCode !== 200 && output.statusCode >= 300) {
986
805
  return deserializeAws_restJson1DeleteMissionProfileCommandError(output, context);
987
806
  }
988
- const contents = {
807
+ const contents = map({
989
808
  $metadata: deserializeMetadata(output),
990
- missionProfileId: undefined,
991
- };
809
+ });
992
810
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
993
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
811
+ if (data.missionProfileId != null) {
994
812
  contents.missionProfileId = (0, smithy_client_1.expectString)(data.missionProfileId);
995
813
  }
996
- return Promise.resolve(contents);
814
+ return contents;
997
815
  };
998
816
  exports.deserializeAws_restJson1DeleteMissionProfileCommand = deserializeAws_restJson1DeleteMissionProfileCommand;
999
817
  const deserializeAws_restJson1DeleteMissionProfileCommandError = async (output, context) => {
@@ -1001,7 +819,6 @@ const deserializeAws_restJson1DeleteMissionProfileCommandError = async (output,
1001
819
  ...output,
1002
820
  body: await parseBody(output.body, context),
1003
821
  };
1004
- let response;
1005
822
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1006
823
  switch (errorCode) {
1007
824
  case "DependencyException":
@@ -1015,81 +832,65 @@ const deserializeAws_restJson1DeleteMissionProfileCommandError = async (output,
1015
832
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1016
833
  default:
1017
834
  const parsedBody = parsedOutput.body;
1018
- const $metadata = deserializeMetadata(output);
1019
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1020
- response = new GroundStationServiceException_1.GroundStationServiceException({
1021
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1022
- $fault: "client",
1023
- $metadata,
835
+ (0, smithy_client_1.throwDefaultError)({
836
+ output,
837
+ parsedBody,
838
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
839
+ errorCode,
1024
840
  });
1025
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1026
841
  }
1027
842
  };
1028
843
  const deserializeAws_restJson1DescribeContactCommand = async (output, context) => {
1029
844
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1030
845
  return deserializeAws_restJson1DescribeContactCommandError(output, context);
1031
846
  }
1032
- const contents = {
847
+ const contents = map({
1033
848
  $metadata: deserializeMetadata(output),
1034
- contactId: undefined,
1035
- contactStatus: undefined,
1036
- dataflowList: undefined,
1037
- endTime: undefined,
1038
- errorMessage: undefined,
1039
- groundStation: undefined,
1040
- maximumElevation: undefined,
1041
- missionProfileArn: undefined,
1042
- postPassEndTime: undefined,
1043
- prePassStartTime: undefined,
1044
- region: undefined,
1045
- satelliteArn: undefined,
1046
- startTime: undefined,
1047
- tags: undefined,
1048
- };
849
+ });
1049
850
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1050
- if (data.contactId !== undefined && data.contactId !== null) {
851
+ if (data.contactId != null) {
1051
852
  contents.contactId = (0, smithy_client_1.expectString)(data.contactId);
1052
853
  }
1053
- if (data.contactStatus !== undefined && data.contactStatus !== null) {
854
+ if (data.contactStatus != null) {
1054
855
  contents.contactStatus = (0, smithy_client_1.expectString)(data.contactStatus);
1055
856
  }
1056
- if (data.dataflowList !== undefined && data.dataflowList !== null) {
857
+ if (data.dataflowList != null) {
1057
858
  contents.dataflowList = deserializeAws_restJson1DataflowList(data.dataflowList, context);
1058
859
  }
1059
- if (data.endTime !== undefined && data.endTime !== null) {
860
+ if (data.endTime != null) {
1060
861
  contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1061
862
  }
1062
- if (data.errorMessage !== undefined && data.errorMessage !== null) {
863
+ if (data.errorMessage != null) {
1063
864
  contents.errorMessage = (0, smithy_client_1.expectString)(data.errorMessage);
1064
865
  }
1065
- if (data.groundStation !== undefined && data.groundStation !== null) {
866
+ if (data.groundStation != null) {
1066
867
  contents.groundStation = (0, smithy_client_1.expectString)(data.groundStation);
1067
868
  }
1068
- if (data.maximumElevation !== undefined && data.maximumElevation !== null) {
869
+ if (data.maximumElevation != null) {
1069
870
  contents.maximumElevation = deserializeAws_restJson1Elevation(data.maximumElevation, context);
1070
871
  }
1071
- if (data.missionProfileArn !== undefined && data.missionProfileArn !== null) {
872
+ if (data.missionProfileArn != null) {
1072
873
  contents.missionProfileArn = (0, smithy_client_1.expectString)(data.missionProfileArn);
1073
874
  }
1074
- if (data.postPassEndTime !== undefined && data.postPassEndTime !== null) {
875
+ if (data.postPassEndTime != null) {
1075
876
  contents.postPassEndTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.postPassEndTime)));
1076
877
  }
1077
- if (data.prePassStartTime !== undefined && data.prePassStartTime !== null) {
878
+ if (data.prePassStartTime != null) {
1078
879
  contents.prePassStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.prePassStartTime)));
1079
880
  }
1080
- if (data.region !== undefined && data.region !== null) {
881
+ if (data.region != null) {
1081
882
  contents.region = (0, smithy_client_1.expectString)(data.region);
1082
883
  }
1083
- if (data.satelliteArn !== undefined && data.satelliteArn !== null) {
884
+ if (data.satelliteArn != null) {
1084
885
  contents.satelliteArn = (0, smithy_client_1.expectString)(data.satelliteArn);
1085
886
  }
1086
- if (data.startTime !== undefined && data.startTime !== null) {
887
+ if (data.startTime != null) {
1087
888
  contents.startTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.startTime)));
1088
889
  }
1089
- if (data.tags !== undefined && data.tags !== null) {
890
+ if (data.tags != null) {
1090
891
  contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1091
892
  }
1092
- return Promise.resolve(contents);
893
+ return contents;
1093
894
  };
1094
895
  exports.deserializeAws_restJson1DescribeContactCommand = deserializeAws_restJson1DescribeContactCommand;
1095
896
  const deserializeAws_restJson1DescribeContactCommandError = async (output, context) => {
@@ -1097,7 +898,6 @@ const deserializeAws_restJson1DescribeContactCommandError = async (output, conte
1097
898
  ...output,
1098
899
  body: await parseBody(output.body, context),
1099
900
  };
1100
- let response;
1101
901
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1102
902
  switch (errorCode) {
1103
903
  case "DependencyException":
@@ -1111,49 +911,41 @@ const deserializeAws_restJson1DescribeContactCommandError = async (output, conte
1111
911
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1112
912
  default:
1113
913
  const parsedBody = parsedOutput.body;
1114
- const $metadata = deserializeMetadata(output);
1115
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1116
- response = new GroundStationServiceException_1.GroundStationServiceException({
1117
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1118
- $fault: "client",
1119
- $metadata,
914
+ (0, smithy_client_1.throwDefaultError)({
915
+ output,
916
+ parsedBody,
917
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
918
+ errorCode,
1120
919
  });
1121
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1122
920
  }
1123
921
  };
1124
922
  const deserializeAws_restJson1GetConfigCommand = async (output, context) => {
1125
923
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1126
924
  return deserializeAws_restJson1GetConfigCommandError(output, context);
1127
925
  }
1128
- const contents = {
926
+ const contents = map({
1129
927
  $metadata: deserializeMetadata(output),
1130
- configArn: undefined,
1131
- configData: undefined,
1132
- configId: undefined,
1133
- configType: undefined,
1134
- name: undefined,
1135
- tags: undefined,
1136
- };
928
+ });
1137
929
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1138
- if (data.configArn !== undefined && data.configArn !== null) {
930
+ if (data.configArn != null) {
1139
931
  contents.configArn = (0, smithy_client_1.expectString)(data.configArn);
1140
932
  }
1141
- if (data.configData !== undefined && data.configData !== null) {
933
+ if (data.configData != null) {
1142
934
  contents.configData = deserializeAws_restJson1ConfigTypeData((0, smithy_client_1.expectUnion)(data.configData), context);
1143
935
  }
1144
- if (data.configId !== undefined && data.configId !== null) {
936
+ if (data.configId != null) {
1145
937
  contents.configId = (0, smithy_client_1.expectString)(data.configId);
1146
938
  }
1147
- if (data.configType !== undefined && data.configType !== null) {
939
+ if (data.configType != null) {
1148
940
  contents.configType = (0, smithy_client_1.expectString)(data.configType);
1149
941
  }
1150
- if (data.name !== undefined && data.name !== null) {
942
+ if (data.name != null) {
1151
943
  contents.name = (0, smithy_client_1.expectString)(data.name);
1152
944
  }
1153
- if (data.tags !== undefined && data.tags !== null) {
945
+ if (data.tags != null) {
1154
946
  contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1155
947
  }
1156
- return Promise.resolve(contents);
948
+ return contents;
1157
949
  };
1158
950
  exports.deserializeAws_restJson1GetConfigCommand = deserializeAws_restJson1GetConfigCommand;
1159
951
  const deserializeAws_restJson1GetConfigCommandError = async (output, context) => {
@@ -1161,7 +953,6 @@ const deserializeAws_restJson1GetConfigCommandError = async (output, context) =>
1161
953
  ...output,
1162
954
  body: await parseBody(output.body, context),
1163
955
  };
1164
- let response;
1165
956
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1166
957
  switch (errorCode) {
1167
958
  case "DependencyException":
@@ -1175,41 +966,35 @@ const deserializeAws_restJson1GetConfigCommandError = async (output, context) =>
1175
966
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1176
967
  default:
1177
968
  const parsedBody = parsedOutput.body;
1178
- const $metadata = deserializeMetadata(output);
1179
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1180
- response = new GroundStationServiceException_1.GroundStationServiceException({
1181
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1182
- $fault: "client",
1183
- $metadata,
969
+ (0, smithy_client_1.throwDefaultError)({
970
+ output,
971
+ parsedBody,
972
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
973
+ errorCode,
1184
974
  });
1185
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1186
975
  }
1187
976
  };
1188
977
  const deserializeAws_restJson1GetDataflowEndpointGroupCommand = async (output, context) => {
1189
978
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1190
979
  return deserializeAws_restJson1GetDataflowEndpointGroupCommandError(output, context);
1191
980
  }
1192
- const contents = {
981
+ const contents = map({
1193
982
  $metadata: deserializeMetadata(output),
1194
- dataflowEndpointGroupArn: undefined,
1195
- dataflowEndpointGroupId: undefined,
1196
- endpointsDetails: undefined,
1197
- tags: undefined,
1198
- };
983
+ });
1199
984
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1200
- if (data.dataflowEndpointGroupArn !== undefined && data.dataflowEndpointGroupArn !== null) {
985
+ if (data.dataflowEndpointGroupArn != null) {
1201
986
  contents.dataflowEndpointGroupArn = (0, smithy_client_1.expectString)(data.dataflowEndpointGroupArn);
1202
987
  }
1203
- if (data.dataflowEndpointGroupId !== undefined && data.dataflowEndpointGroupId !== null) {
988
+ if (data.dataflowEndpointGroupId != null) {
1204
989
  contents.dataflowEndpointGroupId = (0, smithy_client_1.expectString)(data.dataflowEndpointGroupId);
1205
990
  }
1206
- if (data.endpointsDetails !== undefined && data.endpointsDetails !== null) {
991
+ if (data.endpointsDetails != null) {
1207
992
  contents.endpointsDetails = deserializeAws_restJson1EndpointDetailsList(data.endpointsDetails, context);
1208
993
  }
1209
- if (data.tags !== undefined && data.tags !== null) {
994
+ if (data.tags != null) {
1210
995
  contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1211
996
  }
1212
- return Promise.resolve(contents);
997
+ return contents;
1213
998
  };
1214
999
  exports.deserializeAws_restJson1GetDataflowEndpointGroupCommand = deserializeAws_restJson1GetDataflowEndpointGroupCommand;
1215
1000
  const deserializeAws_restJson1GetDataflowEndpointGroupCommandError = async (output, context) => {
@@ -1217,7 +1002,6 @@ const deserializeAws_restJson1GetDataflowEndpointGroupCommandError = async (outp
1217
1002
  ...output,
1218
1003
  body: await parseBody(output.body, context),
1219
1004
  };
1220
- let response;
1221
1005
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1222
1006
  switch (errorCode) {
1223
1007
  case "DependencyException":
@@ -1231,45 +1015,38 @@ const deserializeAws_restJson1GetDataflowEndpointGroupCommandError = async (outp
1231
1015
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1232
1016
  default:
1233
1017
  const parsedBody = parsedOutput.body;
1234
- const $metadata = deserializeMetadata(output);
1235
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1236
- response = new GroundStationServiceException_1.GroundStationServiceException({
1237
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1238
- $fault: "client",
1239
- $metadata,
1018
+ (0, smithy_client_1.throwDefaultError)({
1019
+ output,
1020
+ parsedBody,
1021
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1022
+ errorCode,
1240
1023
  });
1241
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1242
1024
  }
1243
1025
  };
1244
1026
  const deserializeAws_restJson1GetMinuteUsageCommand = async (output, context) => {
1245
1027
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1246
1028
  return deserializeAws_restJson1GetMinuteUsageCommandError(output, context);
1247
1029
  }
1248
- const contents = {
1030
+ const contents = map({
1249
1031
  $metadata: deserializeMetadata(output),
1250
- estimatedMinutesRemaining: undefined,
1251
- isReservedMinutesCustomer: undefined,
1252
- totalReservedMinuteAllocation: undefined,
1253
- totalScheduledMinutes: undefined,
1254
- upcomingMinutesScheduled: undefined,
1255
- };
1032
+ });
1256
1033
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1257
- if (data.estimatedMinutesRemaining !== undefined && data.estimatedMinutesRemaining !== null) {
1034
+ if (data.estimatedMinutesRemaining != null) {
1258
1035
  contents.estimatedMinutesRemaining = (0, smithy_client_1.expectInt32)(data.estimatedMinutesRemaining);
1259
1036
  }
1260
- if (data.isReservedMinutesCustomer !== undefined && data.isReservedMinutesCustomer !== null) {
1037
+ if (data.isReservedMinutesCustomer != null) {
1261
1038
  contents.isReservedMinutesCustomer = (0, smithy_client_1.expectBoolean)(data.isReservedMinutesCustomer);
1262
1039
  }
1263
- if (data.totalReservedMinuteAllocation !== undefined && data.totalReservedMinuteAllocation !== null) {
1040
+ if (data.totalReservedMinuteAllocation != null) {
1264
1041
  contents.totalReservedMinuteAllocation = (0, smithy_client_1.expectInt32)(data.totalReservedMinuteAllocation);
1265
1042
  }
1266
- if (data.totalScheduledMinutes !== undefined && data.totalScheduledMinutes !== null) {
1043
+ if (data.totalScheduledMinutes != null) {
1267
1044
  contents.totalScheduledMinutes = (0, smithy_client_1.expectInt32)(data.totalScheduledMinutes);
1268
1045
  }
1269
- if (data.upcomingMinutesScheduled !== undefined && data.upcomingMinutesScheduled !== null) {
1046
+ if (data.upcomingMinutesScheduled != null) {
1270
1047
  contents.upcomingMinutesScheduled = (0, smithy_client_1.expectInt32)(data.upcomingMinutesScheduled);
1271
1048
  }
1272
- return Promise.resolve(contents);
1049
+ return contents;
1273
1050
  };
1274
1051
  exports.deserializeAws_restJson1GetMinuteUsageCommand = deserializeAws_restJson1GetMinuteUsageCommand;
1275
1052
  const deserializeAws_restJson1GetMinuteUsageCommandError = async (output, context) => {
@@ -1277,7 +1054,6 @@ const deserializeAws_restJson1GetMinuteUsageCommandError = async (output, contex
1277
1054
  ...output,
1278
1055
  body: await parseBody(output.body, context),
1279
1056
  };
1280
- let response;
1281
1057
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1282
1058
  switch (errorCode) {
1283
1059
  case "DependencyException":
@@ -1291,65 +1067,53 @@ const deserializeAws_restJson1GetMinuteUsageCommandError = async (output, contex
1291
1067
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1292
1068
  default:
1293
1069
  const parsedBody = parsedOutput.body;
1294
- const $metadata = deserializeMetadata(output);
1295
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1296
- response = new GroundStationServiceException_1.GroundStationServiceException({
1297
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1298
- $fault: "client",
1299
- $metadata,
1070
+ (0, smithy_client_1.throwDefaultError)({
1071
+ output,
1072
+ parsedBody,
1073
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1074
+ errorCode,
1300
1075
  });
1301
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1302
1076
  }
1303
1077
  };
1304
1078
  const deserializeAws_restJson1GetMissionProfileCommand = async (output, context) => {
1305
1079
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1306
1080
  return deserializeAws_restJson1GetMissionProfileCommandError(output, context);
1307
1081
  }
1308
- const contents = {
1082
+ const contents = map({
1309
1083
  $metadata: deserializeMetadata(output),
1310
- contactPostPassDurationSeconds: undefined,
1311
- contactPrePassDurationSeconds: undefined,
1312
- dataflowEdges: undefined,
1313
- minimumViableContactDurationSeconds: undefined,
1314
- missionProfileArn: undefined,
1315
- missionProfileId: undefined,
1316
- name: undefined,
1317
- region: undefined,
1318
- tags: undefined,
1319
- trackingConfigArn: undefined,
1320
- };
1084
+ });
1321
1085
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1322
- if (data.contactPostPassDurationSeconds !== undefined && data.contactPostPassDurationSeconds !== null) {
1086
+ if (data.contactPostPassDurationSeconds != null) {
1323
1087
  contents.contactPostPassDurationSeconds = (0, smithy_client_1.expectInt32)(data.contactPostPassDurationSeconds);
1324
1088
  }
1325
- if (data.contactPrePassDurationSeconds !== undefined && data.contactPrePassDurationSeconds !== null) {
1089
+ if (data.contactPrePassDurationSeconds != null) {
1326
1090
  contents.contactPrePassDurationSeconds = (0, smithy_client_1.expectInt32)(data.contactPrePassDurationSeconds);
1327
1091
  }
1328
- if (data.dataflowEdges !== undefined && data.dataflowEdges !== null) {
1092
+ if (data.dataflowEdges != null) {
1329
1093
  contents.dataflowEdges = deserializeAws_restJson1DataflowEdgeList(data.dataflowEdges, context);
1330
1094
  }
1331
- if (data.minimumViableContactDurationSeconds !== undefined && data.minimumViableContactDurationSeconds !== null) {
1095
+ if (data.minimumViableContactDurationSeconds != null) {
1332
1096
  contents.minimumViableContactDurationSeconds = (0, smithy_client_1.expectInt32)(data.minimumViableContactDurationSeconds);
1333
1097
  }
1334
- if (data.missionProfileArn !== undefined && data.missionProfileArn !== null) {
1098
+ if (data.missionProfileArn != null) {
1335
1099
  contents.missionProfileArn = (0, smithy_client_1.expectString)(data.missionProfileArn);
1336
1100
  }
1337
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
1101
+ if (data.missionProfileId != null) {
1338
1102
  contents.missionProfileId = (0, smithy_client_1.expectString)(data.missionProfileId);
1339
1103
  }
1340
- if (data.name !== undefined && data.name !== null) {
1104
+ if (data.name != null) {
1341
1105
  contents.name = (0, smithy_client_1.expectString)(data.name);
1342
1106
  }
1343
- if (data.region !== undefined && data.region !== null) {
1107
+ if (data.region != null) {
1344
1108
  contents.region = (0, smithy_client_1.expectString)(data.region);
1345
1109
  }
1346
- if (data.tags !== undefined && data.tags !== null) {
1110
+ if (data.tags != null) {
1347
1111
  contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1348
1112
  }
1349
- if (data.trackingConfigArn !== undefined && data.trackingConfigArn !== null) {
1113
+ if (data.trackingConfigArn != null) {
1350
1114
  contents.trackingConfigArn = (0, smithy_client_1.expectString)(data.trackingConfigArn);
1351
1115
  }
1352
- return Promise.resolve(contents);
1116
+ return contents;
1353
1117
  };
1354
1118
  exports.deserializeAws_restJson1GetMissionProfileCommand = deserializeAws_restJson1GetMissionProfileCommand;
1355
1119
  const deserializeAws_restJson1GetMissionProfileCommandError = async (output, context) => {
@@ -1357,7 +1121,6 @@ const deserializeAws_restJson1GetMissionProfileCommandError = async (output, con
1357
1121
  ...output,
1358
1122
  body: await parseBody(output.body, context),
1359
1123
  };
1360
- let response;
1361
1124
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1362
1125
  switch (errorCode) {
1363
1126
  case "DependencyException":
@@ -1371,41 +1134,35 @@ const deserializeAws_restJson1GetMissionProfileCommandError = async (output, con
1371
1134
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1372
1135
  default:
1373
1136
  const parsedBody = parsedOutput.body;
1374
- const $metadata = deserializeMetadata(output);
1375
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1376
- response = new GroundStationServiceException_1.GroundStationServiceException({
1377
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1378
- $fault: "client",
1379
- $metadata,
1137
+ (0, smithy_client_1.throwDefaultError)({
1138
+ output,
1139
+ parsedBody,
1140
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1141
+ errorCode,
1380
1142
  });
1381
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1382
1143
  }
1383
1144
  };
1384
1145
  const deserializeAws_restJson1GetSatelliteCommand = async (output, context) => {
1385
1146
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1386
1147
  return deserializeAws_restJson1GetSatelliteCommandError(output, context);
1387
1148
  }
1388
- const contents = {
1149
+ const contents = map({
1389
1150
  $metadata: deserializeMetadata(output),
1390
- groundStations: undefined,
1391
- noradSatelliteID: undefined,
1392
- satelliteArn: undefined,
1393
- satelliteId: undefined,
1394
- };
1151
+ });
1395
1152
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1396
- if (data.groundStations !== undefined && data.groundStations !== null) {
1153
+ if (data.groundStations != null) {
1397
1154
  contents.groundStations = deserializeAws_restJson1GroundStationIdList(data.groundStations, context);
1398
1155
  }
1399
- if (data.noradSatelliteID !== undefined && data.noradSatelliteID !== null) {
1156
+ if (data.noradSatelliteID != null) {
1400
1157
  contents.noradSatelliteID = (0, smithy_client_1.expectInt32)(data.noradSatelliteID);
1401
1158
  }
1402
- if (data.satelliteArn !== undefined && data.satelliteArn !== null) {
1159
+ if (data.satelliteArn != null) {
1403
1160
  contents.satelliteArn = (0, smithy_client_1.expectString)(data.satelliteArn);
1404
1161
  }
1405
- if (data.satelliteId !== undefined && data.satelliteId !== null) {
1162
+ if (data.satelliteId != null) {
1406
1163
  contents.satelliteId = (0, smithy_client_1.expectString)(data.satelliteId);
1407
1164
  }
1408
- return Promise.resolve(contents);
1165
+ return contents;
1409
1166
  };
1410
1167
  exports.deserializeAws_restJson1GetSatelliteCommand = deserializeAws_restJson1GetSatelliteCommand;
1411
1168
  const deserializeAws_restJson1GetSatelliteCommandError = async (output, context) => {
@@ -1413,7 +1170,6 @@ const deserializeAws_restJson1GetSatelliteCommandError = async (output, context)
1413
1170
  ...output,
1414
1171
  body: await parseBody(output.body, context),
1415
1172
  };
1416
- let response;
1417
1173
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
1174
  switch (errorCode) {
1419
1175
  case "DependencyException":
@@ -1427,33 +1183,29 @@ const deserializeAws_restJson1GetSatelliteCommandError = async (output, context)
1427
1183
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1428
1184
  default:
1429
1185
  const parsedBody = parsedOutput.body;
1430
- const $metadata = deserializeMetadata(output);
1431
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1432
- response = new GroundStationServiceException_1.GroundStationServiceException({
1433
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1434
- $fault: "client",
1435
- $metadata,
1186
+ (0, smithy_client_1.throwDefaultError)({
1187
+ output,
1188
+ parsedBody,
1189
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1190
+ errorCode,
1436
1191
  });
1437
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1438
1192
  }
1439
1193
  };
1440
1194
  const deserializeAws_restJson1ListConfigsCommand = async (output, context) => {
1441
1195
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1442
1196
  return deserializeAws_restJson1ListConfigsCommandError(output, context);
1443
1197
  }
1444
- const contents = {
1198
+ const contents = map({
1445
1199
  $metadata: deserializeMetadata(output),
1446
- configList: undefined,
1447
- nextToken: undefined,
1448
- };
1200
+ });
1449
1201
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1450
- if (data.configList !== undefined && data.configList !== null) {
1202
+ if (data.configList != null) {
1451
1203
  contents.configList = deserializeAws_restJson1ConfigList(data.configList, context);
1452
1204
  }
1453
- if (data.nextToken !== undefined && data.nextToken !== null) {
1205
+ if (data.nextToken != null) {
1454
1206
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1455
1207
  }
1456
- return Promise.resolve(contents);
1208
+ return contents;
1457
1209
  };
1458
1210
  exports.deserializeAws_restJson1ListConfigsCommand = deserializeAws_restJson1ListConfigsCommand;
1459
1211
  const deserializeAws_restJson1ListConfigsCommandError = async (output, context) => {
@@ -1461,7 +1213,6 @@ const deserializeAws_restJson1ListConfigsCommandError = async (output, context)
1461
1213
  ...output,
1462
1214
  body: await parseBody(output.body, context),
1463
1215
  };
1464
- let response;
1465
1216
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1466
1217
  switch (errorCode) {
1467
1218
  case "DependencyException":
@@ -1475,33 +1226,29 @@ const deserializeAws_restJson1ListConfigsCommandError = async (output, context)
1475
1226
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1476
1227
  default:
1477
1228
  const parsedBody = parsedOutput.body;
1478
- const $metadata = deserializeMetadata(output);
1479
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1480
- response = new GroundStationServiceException_1.GroundStationServiceException({
1481
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1482
- $fault: "client",
1483
- $metadata,
1229
+ (0, smithy_client_1.throwDefaultError)({
1230
+ output,
1231
+ parsedBody,
1232
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1233
+ errorCode,
1484
1234
  });
1485
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1486
1235
  }
1487
1236
  };
1488
1237
  const deserializeAws_restJson1ListContactsCommand = async (output, context) => {
1489
1238
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1490
1239
  return deserializeAws_restJson1ListContactsCommandError(output, context);
1491
1240
  }
1492
- const contents = {
1241
+ const contents = map({
1493
1242
  $metadata: deserializeMetadata(output),
1494
- contactList: undefined,
1495
- nextToken: undefined,
1496
- };
1243
+ });
1497
1244
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1498
- if (data.contactList !== undefined && data.contactList !== null) {
1245
+ if (data.contactList != null) {
1499
1246
  contents.contactList = deserializeAws_restJson1ContactList(data.contactList, context);
1500
1247
  }
1501
- if (data.nextToken !== undefined && data.nextToken !== null) {
1248
+ if (data.nextToken != null) {
1502
1249
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1503
1250
  }
1504
- return Promise.resolve(contents);
1251
+ return contents;
1505
1252
  };
1506
1253
  exports.deserializeAws_restJson1ListContactsCommand = deserializeAws_restJson1ListContactsCommand;
1507
1254
  const deserializeAws_restJson1ListContactsCommandError = async (output, context) => {
@@ -1509,7 +1256,6 @@ const deserializeAws_restJson1ListContactsCommandError = async (output, context)
1509
1256
  ...output,
1510
1257
  body: await parseBody(output.body, context),
1511
1258
  };
1512
- let response;
1513
1259
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1514
1260
  switch (errorCode) {
1515
1261
  case "DependencyException":
@@ -1523,33 +1269,29 @@ const deserializeAws_restJson1ListContactsCommandError = async (output, context)
1523
1269
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1524
1270
  default:
1525
1271
  const parsedBody = parsedOutput.body;
1526
- const $metadata = deserializeMetadata(output);
1527
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1528
- response = new GroundStationServiceException_1.GroundStationServiceException({
1529
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1530
- $fault: "client",
1531
- $metadata,
1272
+ (0, smithy_client_1.throwDefaultError)({
1273
+ output,
1274
+ parsedBody,
1275
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1276
+ errorCode,
1532
1277
  });
1533
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1534
1278
  }
1535
1279
  };
1536
1280
  const deserializeAws_restJson1ListDataflowEndpointGroupsCommand = async (output, context) => {
1537
1281
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1538
1282
  return deserializeAws_restJson1ListDataflowEndpointGroupsCommandError(output, context);
1539
1283
  }
1540
- const contents = {
1284
+ const contents = map({
1541
1285
  $metadata: deserializeMetadata(output),
1542
- dataflowEndpointGroupList: undefined,
1543
- nextToken: undefined,
1544
- };
1286
+ });
1545
1287
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1546
- if (data.dataflowEndpointGroupList !== undefined && data.dataflowEndpointGroupList !== null) {
1288
+ if (data.dataflowEndpointGroupList != null) {
1547
1289
  contents.dataflowEndpointGroupList = deserializeAws_restJson1DataflowEndpointGroupList(data.dataflowEndpointGroupList, context);
1548
1290
  }
1549
- if (data.nextToken !== undefined && data.nextToken !== null) {
1291
+ if (data.nextToken != null) {
1550
1292
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1551
1293
  }
1552
- return Promise.resolve(contents);
1294
+ return contents;
1553
1295
  };
1554
1296
  exports.deserializeAws_restJson1ListDataflowEndpointGroupsCommand = deserializeAws_restJson1ListDataflowEndpointGroupsCommand;
1555
1297
  const deserializeAws_restJson1ListDataflowEndpointGroupsCommandError = async (output, context) => {
@@ -1557,7 +1299,6 @@ const deserializeAws_restJson1ListDataflowEndpointGroupsCommandError = async (ou
1557
1299
  ...output,
1558
1300
  body: await parseBody(output.body, context),
1559
1301
  };
1560
- let response;
1561
1302
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1562
1303
  switch (errorCode) {
1563
1304
  case "DependencyException":
@@ -1571,33 +1312,29 @@ const deserializeAws_restJson1ListDataflowEndpointGroupsCommandError = async (ou
1571
1312
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1572
1313
  default:
1573
1314
  const parsedBody = parsedOutput.body;
1574
- const $metadata = deserializeMetadata(output);
1575
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1576
- response = new GroundStationServiceException_1.GroundStationServiceException({
1577
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1578
- $fault: "client",
1579
- $metadata,
1315
+ (0, smithy_client_1.throwDefaultError)({
1316
+ output,
1317
+ parsedBody,
1318
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1319
+ errorCode,
1580
1320
  });
1581
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1582
1321
  }
1583
1322
  };
1584
1323
  const deserializeAws_restJson1ListGroundStationsCommand = async (output, context) => {
1585
1324
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1586
1325
  return deserializeAws_restJson1ListGroundStationsCommandError(output, context);
1587
1326
  }
1588
- const contents = {
1327
+ const contents = map({
1589
1328
  $metadata: deserializeMetadata(output),
1590
- groundStationList: undefined,
1591
- nextToken: undefined,
1592
- };
1329
+ });
1593
1330
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1594
- if (data.groundStationList !== undefined && data.groundStationList !== null) {
1331
+ if (data.groundStationList != null) {
1595
1332
  contents.groundStationList = deserializeAws_restJson1GroundStationList(data.groundStationList, context);
1596
1333
  }
1597
- if (data.nextToken !== undefined && data.nextToken !== null) {
1334
+ if (data.nextToken != null) {
1598
1335
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1599
1336
  }
1600
- return Promise.resolve(contents);
1337
+ return contents;
1601
1338
  };
1602
1339
  exports.deserializeAws_restJson1ListGroundStationsCommand = deserializeAws_restJson1ListGroundStationsCommand;
1603
1340
  const deserializeAws_restJson1ListGroundStationsCommandError = async (output, context) => {
@@ -1605,7 +1342,6 @@ const deserializeAws_restJson1ListGroundStationsCommandError = async (output, co
1605
1342
  ...output,
1606
1343
  body: await parseBody(output.body, context),
1607
1344
  };
1608
- let response;
1609
1345
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1610
1346
  switch (errorCode) {
1611
1347
  case "DependencyException":
@@ -1619,33 +1355,29 @@ const deserializeAws_restJson1ListGroundStationsCommandError = async (output, co
1619
1355
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1620
1356
  default:
1621
1357
  const parsedBody = parsedOutput.body;
1622
- const $metadata = deserializeMetadata(output);
1623
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1624
- response = new GroundStationServiceException_1.GroundStationServiceException({
1625
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1626
- $fault: "client",
1627
- $metadata,
1358
+ (0, smithy_client_1.throwDefaultError)({
1359
+ output,
1360
+ parsedBody,
1361
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1362
+ errorCode,
1628
1363
  });
1629
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1630
1364
  }
1631
1365
  };
1632
1366
  const deserializeAws_restJson1ListMissionProfilesCommand = async (output, context) => {
1633
1367
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1634
1368
  return deserializeAws_restJson1ListMissionProfilesCommandError(output, context);
1635
1369
  }
1636
- const contents = {
1370
+ const contents = map({
1637
1371
  $metadata: deserializeMetadata(output),
1638
- missionProfileList: undefined,
1639
- nextToken: undefined,
1640
- };
1372
+ });
1641
1373
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1642
- if (data.missionProfileList !== undefined && data.missionProfileList !== null) {
1374
+ if (data.missionProfileList != null) {
1643
1375
  contents.missionProfileList = deserializeAws_restJson1MissionProfileList(data.missionProfileList, context);
1644
1376
  }
1645
- if (data.nextToken !== undefined && data.nextToken !== null) {
1377
+ if (data.nextToken != null) {
1646
1378
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1647
1379
  }
1648
- return Promise.resolve(contents);
1380
+ return contents;
1649
1381
  };
1650
1382
  exports.deserializeAws_restJson1ListMissionProfilesCommand = deserializeAws_restJson1ListMissionProfilesCommand;
1651
1383
  const deserializeAws_restJson1ListMissionProfilesCommandError = async (output, context) => {
@@ -1653,7 +1385,6 @@ const deserializeAws_restJson1ListMissionProfilesCommandError = async (output, c
1653
1385
  ...output,
1654
1386
  body: await parseBody(output.body, context),
1655
1387
  };
1656
- let response;
1657
1388
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1658
1389
  switch (errorCode) {
1659
1390
  case "DependencyException":
@@ -1667,33 +1398,29 @@ const deserializeAws_restJson1ListMissionProfilesCommandError = async (output, c
1667
1398
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1668
1399
  default:
1669
1400
  const parsedBody = parsedOutput.body;
1670
- const $metadata = deserializeMetadata(output);
1671
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1672
- response = new GroundStationServiceException_1.GroundStationServiceException({
1673
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1674
- $fault: "client",
1675
- $metadata,
1401
+ (0, smithy_client_1.throwDefaultError)({
1402
+ output,
1403
+ parsedBody,
1404
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1405
+ errorCode,
1676
1406
  });
1677
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1678
1407
  }
1679
1408
  };
1680
1409
  const deserializeAws_restJson1ListSatellitesCommand = async (output, context) => {
1681
1410
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1682
1411
  return deserializeAws_restJson1ListSatellitesCommandError(output, context);
1683
1412
  }
1684
- const contents = {
1413
+ const contents = map({
1685
1414
  $metadata: deserializeMetadata(output),
1686
- nextToken: undefined,
1687
- satellites: undefined,
1688
- };
1415
+ });
1689
1416
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1690
- if (data.nextToken !== undefined && data.nextToken !== null) {
1417
+ if (data.nextToken != null) {
1691
1418
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1692
1419
  }
1693
- if (data.satellites !== undefined && data.satellites !== null) {
1420
+ if (data.satellites != null) {
1694
1421
  contents.satellites = deserializeAws_restJson1SatelliteList(data.satellites, context);
1695
1422
  }
1696
- return Promise.resolve(contents);
1423
+ return contents;
1697
1424
  };
1698
1425
  exports.deserializeAws_restJson1ListSatellitesCommand = deserializeAws_restJson1ListSatellitesCommand;
1699
1426
  const deserializeAws_restJson1ListSatellitesCommandError = async (output, context) => {
@@ -1701,7 +1428,6 @@ const deserializeAws_restJson1ListSatellitesCommandError = async (output, contex
1701
1428
  ...output,
1702
1429
  body: await parseBody(output.body, context),
1703
1430
  };
1704
- let response;
1705
1431
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1706
1432
  switch (errorCode) {
1707
1433
  case "DependencyException":
@@ -1715,29 +1441,26 @@ const deserializeAws_restJson1ListSatellitesCommandError = async (output, contex
1715
1441
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1716
1442
  default:
1717
1443
  const parsedBody = parsedOutput.body;
1718
- const $metadata = deserializeMetadata(output);
1719
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1720
- response = new GroundStationServiceException_1.GroundStationServiceException({
1721
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1722
- $fault: "client",
1723
- $metadata,
1444
+ (0, smithy_client_1.throwDefaultError)({
1445
+ output,
1446
+ parsedBody,
1447
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1448
+ errorCode,
1724
1449
  });
1725
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1726
1450
  }
1727
1451
  };
1728
1452
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1729
1453
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1730
1454
  return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
1731
1455
  }
1732
- const contents = {
1456
+ const contents = map({
1733
1457
  $metadata: deserializeMetadata(output),
1734
- tags: undefined,
1735
- };
1458
+ });
1736
1459
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1737
- if (data.tags !== undefined && data.tags !== null) {
1460
+ if (data.tags != null) {
1738
1461
  contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1739
1462
  }
1740
- return Promise.resolve(contents);
1463
+ return contents;
1741
1464
  };
1742
1465
  exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
1743
1466
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
@@ -1745,7 +1468,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1745
1468
  ...output,
1746
1469
  body: await parseBody(output.body, context),
1747
1470
  };
1748
- let response;
1749
1471
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1750
1472
  switch (errorCode) {
1751
1473
  case "DependencyException":
@@ -1759,29 +1481,26 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1759
1481
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1760
1482
  default:
1761
1483
  const parsedBody = parsedOutput.body;
1762
- const $metadata = deserializeMetadata(output);
1763
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1764
- response = new GroundStationServiceException_1.GroundStationServiceException({
1765
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1766
- $fault: "client",
1767
- $metadata,
1484
+ (0, smithy_client_1.throwDefaultError)({
1485
+ output,
1486
+ parsedBody,
1487
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1488
+ errorCode,
1768
1489
  });
1769
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1770
1490
  }
1771
1491
  };
1772
1492
  const deserializeAws_restJson1ReserveContactCommand = async (output, context) => {
1773
1493
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1774
1494
  return deserializeAws_restJson1ReserveContactCommandError(output, context);
1775
1495
  }
1776
- const contents = {
1496
+ const contents = map({
1777
1497
  $metadata: deserializeMetadata(output),
1778
- contactId: undefined,
1779
- };
1498
+ });
1780
1499
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1781
- if (data.contactId !== undefined && data.contactId !== null) {
1500
+ if (data.contactId != null) {
1782
1501
  contents.contactId = (0, smithy_client_1.expectString)(data.contactId);
1783
1502
  }
1784
- return Promise.resolve(contents);
1503
+ return contents;
1785
1504
  };
1786
1505
  exports.deserializeAws_restJson1ReserveContactCommand = deserializeAws_restJson1ReserveContactCommand;
1787
1506
  const deserializeAws_restJson1ReserveContactCommandError = async (output, context) => {
@@ -1789,7 +1508,6 @@ const deserializeAws_restJson1ReserveContactCommandError = async (output, contex
1789
1508
  ...output,
1790
1509
  body: await parseBody(output.body, context),
1791
1510
  };
1792
- let response;
1793
1511
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1794
1512
  switch (errorCode) {
1795
1513
  case "DependencyException":
@@ -1803,25 +1521,23 @@ const deserializeAws_restJson1ReserveContactCommandError = async (output, contex
1803
1521
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1804
1522
  default:
1805
1523
  const parsedBody = parsedOutput.body;
1806
- const $metadata = deserializeMetadata(output);
1807
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1808
- response = new GroundStationServiceException_1.GroundStationServiceException({
1809
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1810
- $fault: "client",
1811
- $metadata,
1524
+ (0, smithy_client_1.throwDefaultError)({
1525
+ output,
1526
+ parsedBody,
1527
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1528
+ errorCode,
1812
1529
  });
1813
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1814
1530
  }
1815
1531
  };
1816
1532
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
1817
1533
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1818
1534
  return deserializeAws_restJson1TagResourceCommandError(output, context);
1819
1535
  }
1820
- const contents = {
1536
+ const contents = map({
1821
1537
  $metadata: deserializeMetadata(output),
1822
- };
1538
+ });
1823
1539
  await collectBody(output.body, context);
1824
- return Promise.resolve(contents);
1540
+ return contents;
1825
1541
  };
1826
1542
  exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
1827
1543
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
@@ -1829,7 +1545,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1829
1545
  ...output,
1830
1546
  body: await parseBody(output.body, context),
1831
1547
  };
1832
- let response;
1833
1548
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1834
1549
  switch (errorCode) {
1835
1550
  case "DependencyException":
@@ -1843,25 +1558,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1843
1558
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1844
1559
  default:
1845
1560
  const parsedBody = parsedOutput.body;
1846
- const $metadata = deserializeMetadata(output);
1847
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1848
- response = new GroundStationServiceException_1.GroundStationServiceException({
1849
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1850
- $fault: "client",
1851
- $metadata,
1561
+ (0, smithy_client_1.throwDefaultError)({
1562
+ output,
1563
+ parsedBody,
1564
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1565
+ errorCode,
1852
1566
  });
1853
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1854
1567
  }
1855
1568
  };
1856
1569
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
1857
1570
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1858
1571
  return deserializeAws_restJson1UntagResourceCommandError(output, context);
1859
1572
  }
1860
- const contents = {
1573
+ const contents = map({
1861
1574
  $metadata: deserializeMetadata(output),
1862
- };
1575
+ });
1863
1576
  await collectBody(output.body, context);
1864
- return Promise.resolve(contents);
1577
+ return contents;
1865
1578
  };
1866
1579
  exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
1867
1580
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
@@ -1869,7 +1582,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1869
1582
  ...output,
1870
1583
  body: await parseBody(output.body, context),
1871
1584
  };
1872
- let response;
1873
1585
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1874
1586
  switch (errorCode) {
1875
1587
  case "DependencyException":
@@ -1883,37 +1595,32 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1883
1595
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1884
1596
  default:
1885
1597
  const parsedBody = parsedOutput.body;
1886
- const $metadata = deserializeMetadata(output);
1887
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1888
- response = new GroundStationServiceException_1.GroundStationServiceException({
1889
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1890
- $fault: "client",
1891
- $metadata,
1598
+ (0, smithy_client_1.throwDefaultError)({
1599
+ output,
1600
+ parsedBody,
1601
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1602
+ errorCode,
1892
1603
  });
1893
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1894
1604
  }
1895
1605
  };
1896
1606
  const deserializeAws_restJson1UpdateConfigCommand = async (output, context) => {
1897
1607
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1898
1608
  return deserializeAws_restJson1UpdateConfigCommandError(output, context);
1899
1609
  }
1900
- const contents = {
1610
+ const contents = map({
1901
1611
  $metadata: deserializeMetadata(output),
1902
- configArn: undefined,
1903
- configId: undefined,
1904
- configType: undefined,
1905
- };
1612
+ });
1906
1613
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1907
- if (data.configArn !== undefined && data.configArn !== null) {
1614
+ if (data.configArn != null) {
1908
1615
  contents.configArn = (0, smithy_client_1.expectString)(data.configArn);
1909
1616
  }
1910
- if (data.configId !== undefined && data.configId !== null) {
1617
+ if (data.configId != null) {
1911
1618
  contents.configId = (0, smithy_client_1.expectString)(data.configId);
1912
1619
  }
1913
- if (data.configType !== undefined && data.configType !== null) {
1620
+ if (data.configType != null) {
1914
1621
  contents.configType = (0, smithy_client_1.expectString)(data.configType);
1915
1622
  }
1916
- return Promise.resolve(contents);
1623
+ return contents;
1917
1624
  };
1918
1625
  exports.deserializeAws_restJson1UpdateConfigCommand = deserializeAws_restJson1UpdateConfigCommand;
1919
1626
  const deserializeAws_restJson1UpdateConfigCommandError = async (output, context) => {
@@ -1921,7 +1628,6 @@ const deserializeAws_restJson1UpdateConfigCommandError = async (output, context)
1921
1628
  ...output,
1922
1629
  body: await parseBody(output.body, context),
1923
1630
  };
1924
- let response;
1925
1631
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1926
1632
  switch (errorCode) {
1927
1633
  case "DependencyException":
@@ -1935,29 +1641,26 @@ const deserializeAws_restJson1UpdateConfigCommandError = async (output, context)
1935
1641
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1936
1642
  default:
1937
1643
  const parsedBody = parsedOutput.body;
1938
- const $metadata = deserializeMetadata(output);
1939
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1940
- response = new GroundStationServiceException_1.GroundStationServiceException({
1941
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1942
- $fault: "client",
1943
- $metadata,
1644
+ (0, smithy_client_1.throwDefaultError)({
1645
+ output,
1646
+ parsedBody,
1647
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1648
+ errorCode,
1944
1649
  });
1945
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1946
1650
  }
1947
1651
  };
1948
1652
  const deserializeAws_restJson1UpdateMissionProfileCommand = async (output, context) => {
1949
1653
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1950
1654
  return deserializeAws_restJson1UpdateMissionProfileCommandError(output, context);
1951
1655
  }
1952
- const contents = {
1656
+ const contents = map({
1953
1657
  $metadata: deserializeMetadata(output),
1954
- missionProfileId: undefined,
1955
- };
1658
+ });
1956
1659
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1957
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
1660
+ if (data.missionProfileId != null) {
1958
1661
  contents.missionProfileId = (0, smithy_client_1.expectString)(data.missionProfileId);
1959
1662
  }
1960
- return Promise.resolve(contents);
1663
+ return contents;
1961
1664
  };
1962
1665
  exports.deserializeAws_restJson1UpdateMissionProfileCommand = deserializeAws_restJson1UpdateMissionProfileCommand;
1963
1666
  const deserializeAws_restJson1UpdateMissionProfileCommandError = async (output, context) => {
@@ -1965,7 +1668,6 @@ const deserializeAws_restJson1UpdateMissionProfileCommandError = async (output,
1965
1668
  ...output,
1966
1669
  body: await parseBody(output.body, context),
1967
1670
  };
1968
- let response;
1969
1671
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1970
1672
  switch (errorCode) {
1971
1673
  case "DependencyException":
@@ -1979,23 +1681,22 @@ const deserializeAws_restJson1UpdateMissionProfileCommandError = async (output,
1979
1681
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1980
1682
  default:
1981
1683
  const parsedBody = parsedOutput.body;
1982
- const $metadata = deserializeMetadata(output);
1983
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1984
- response = new GroundStationServiceException_1.GroundStationServiceException({
1985
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1986
- $fault: "client",
1987
- $metadata,
1684
+ (0, smithy_client_1.throwDefaultError)({
1685
+ output,
1686
+ parsedBody,
1687
+ exceptionCtor: GroundStationServiceException_1.GroundStationServiceException,
1688
+ errorCode,
1988
1689
  });
1989
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1990
1690
  }
1991
1691
  };
1692
+ const map = smithy_client_1.map;
1992
1693
  const deserializeAws_restJson1DependencyExceptionResponse = async (parsedOutput, context) => {
1993
- const contents = {};
1694
+ const contents = map({});
1994
1695
  const data = parsedOutput.body;
1995
- if (data.message !== undefined && data.message !== null) {
1696
+ if (data.message != null) {
1996
1697
  contents.message = (0, smithy_client_1.expectString)(data.message);
1997
1698
  }
1998
- if (data.parameterName !== undefined && data.parameterName !== null) {
1699
+ if (data.parameterName != null) {
1999
1700
  contents.parameterName = (0, smithy_client_1.expectString)(data.parameterName);
2000
1701
  }
2001
1702
  const exception = new models_0_1.DependencyException({
@@ -2005,12 +1706,12 @@ const deserializeAws_restJson1DependencyExceptionResponse = async (parsedOutput,
2005
1706
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2006
1707
  };
2007
1708
  const deserializeAws_restJson1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
2008
- const contents = {};
1709
+ const contents = map({});
2009
1710
  const data = parsedOutput.body;
2010
- if (data.message !== undefined && data.message !== null) {
1711
+ if (data.message != null) {
2011
1712
  contents.message = (0, smithy_client_1.expectString)(data.message);
2012
1713
  }
2013
- if (data.parameterName !== undefined && data.parameterName !== null) {
1714
+ if (data.parameterName != null) {
2014
1715
  contents.parameterName = (0, smithy_client_1.expectString)(data.parameterName);
2015
1716
  }
2016
1717
  const exception = new models_0_1.InvalidParameterException({
@@ -2020,12 +1721,12 @@ const deserializeAws_restJson1InvalidParameterExceptionResponse = async (parsedO
2020
1721
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2021
1722
  };
2022
1723
  const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (parsedOutput, context) => {
2023
- const contents = {};
1724
+ const contents = map({});
2024
1725
  const data = parsedOutput.body;
2025
- if (data.message !== undefined && data.message !== null) {
1726
+ if (data.message != null) {
2026
1727
  contents.message = (0, smithy_client_1.expectString)(data.message);
2027
1728
  }
2028
- if (data.parameterName !== undefined && data.parameterName !== null) {
1729
+ if (data.parameterName != null) {
2029
1730
  contents.parameterName = (0, smithy_client_1.expectString)(data.parameterName);
2030
1731
  }
2031
1732
  const exception = new models_0_1.ResourceLimitExceededException({
@@ -2035,9 +1736,9 @@ const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (pa
2035
1736
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2036
1737
  };
2037
1738
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
2038
- const contents = {};
1739
+ const contents = map({});
2039
1740
  const data = parsedOutput.body;
2040
- if (data.message !== undefined && data.message !== null) {
1741
+ if (data.message != null) {
2041
1742
  contents.message = (0, smithy_client_1.expectString)(data.message);
2042
1743
  }
2043
1744
  const exception = new models_0_1.ResourceNotFoundException({
@@ -2099,9 +1800,6 @@ const serializeAws_restJson1DataflowEdge = (input, context) => {
2099
1800
  return input
2100
1801
  .filter((e) => e != null)
2101
1802
  .map((entry) => {
2102
- if (entry === null) {
2103
- return null;
2104
- }
2105
1803
  return entry;
2106
1804
  });
2107
1805
  };
@@ -2109,9 +1807,6 @@ const serializeAws_restJson1DataflowEdgeList = (input, context) => {
2109
1807
  return input
2110
1808
  .filter((e) => e != null)
2111
1809
  .map((entry) => {
2112
- if (entry === null) {
2113
- return null;
2114
- }
2115
1810
  return serializeAws_restJson1DataflowEdge(entry, context);
2116
1811
  });
2117
1812
  };
@@ -2157,9 +1852,6 @@ const serializeAws_restJson1EndpointDetailsList = (input, context) => {
2157
1852
  return input
2158
1853
  .filter((e) => e != null)
2159
1854
  .map((entry) => {
2160
- if (entry === null) {
2161
- return null;
2162
- }
2163
1855
  return serializeAws_restJson1EndpointDetails(entry, context);
2164
1856
  });
2165
1857
  };
@@ -2195,9 +1887,6 @@ const serializeAws_restJson1SecurityGroupIdList = (input, context) => {
2195
1887
  return input
2196
1888
  .filter((e) => e != null)
2197
1889
  .map((entry) => {
2198
- if (entry === null) {
2199
- return null;
2200
- }
2201
1890
  return entry;
2202
1891
  });
2203
1892
  };
@@ -2220,9 +1909,6 @@ const serializeAws_restJson1StatusList = (input, context) => {
2220
1909
  return input
2221
1910
  .filter((e) => e != null)
2222
1911
  .map((entry) => {
2223
- if (entry === null) {
2224
- return null;
2225
- }
2226
1912
  return entry;
2227
1913
  });
2228
1914
  };
@@ -2230,9 +1916,6 @@ const serializeAws_restJson1SubnetList = (input, context) => {
2230
1916
  return input
2231
1917
  .filter((e) => e != null)
2232
1918
  .map((entry) => {
2233
- if (entry === null) {
2234
- return null;
2235
- }
2236
1919
  return entry;
2237
1920
  });
2238
1921
  };
@@ -2299,17 +1982,17 @@ const deserializeAws_restJson1AntennaUplinkConfig = (output, context) => {
2299
1982
  };
2300
1983
  };
2301
1984
  const deserializeAws_restJson1ConfigDetails = (output, context) => {
2302
- if (output.antennaDemodDecodeDetails !== undefined && output.antennaDemodDecodeDetails !== null) {
1985
+ if (output.antennaDemodDecodeDetails != null) {
2303
1986
  return {
2304
1987
  antennaDemodDecodeDetails: deserializeAws_restJson1AntennaDemodDecodeDetails(output.antennaDemodDecodeDetails, context),
2305
1988
  };
2306
1989
  }
2307
- if (output.endpointDetails !== undefined && output.endpointDetails !== null) {
1990
+ if (output.endpointDetails != null) {
2308
1991
  return {
2309
1992
  endpointDetails: deserializeAws_restJson1EndpointDetails(output.endpointDetails, context),
2310
1993
  };
2311
1994
  }
2312
- if (output.s3RecordingDetails !== undefined && output.s3RecordingDetails !== null) {
1995
+ if (output.s3RecordingDetails != null) {
2313
1996
  return {
2314
1997
  s3RecordingDetails: deserializeAws_restJson1S3RecordingDetails(output.s3RecordingDetails, context),
2315
1998
  };
@@ -2336,37 +2019,37 @@ const deserializeAws_restJson1ConfigListItem = (output, context) => {
2336
2019
  };
2337
2020
  };
2338
2021
  const deserializeAws_restJson1ConfigTypeData = (output, context) => {
2339
- if (output.antennaDownlinkConfig !== undefined && output.antennaDownlinkConfig !== null) {
2022
+ if (output.antennaDownlinkConfig != null) {
2340
2023
  return {
2341
2024
  antennaDownlinkConfig: deserializeAws_restJson1AntennaDownlinkConfig(output.antennaDownlinkConfig, context),
2342
2025
  };
2343
2026
  }
2344
- if (output.antennaDownlinkDemodDecodeConfig !== undefined && output.antennaDownlinkDemodDecodeConfig !== null) {
2027
+ if (output.antennaDownlinkDemodDecodeConfig != null) {
2345
2028
  return {
2346
2029
  antennaDownlinkDemodDecodeConfig: deserializeAws_restJson1AntennaDownlinkDemodDecodeConfig(output.antennaDownlinkDemodDecodeConfig, context),
2347
2030
  };
2348
2031
  }
2349
- if (output.antennaUplinkConfig !== undefined && output.antennaUplinkConfig !== null) {
2032
+ if (output.antennaUplinkConfig != null) {
2350
2033
  return {
2351
2034
  antennaUplinkConfig: deserializeAws_restJson1AntennaUplinkConfig(output.antennaUplinkConfig, context),
2352
2035
  };
2353
2036
  }
2354
- if (output.dataflowEndpointConfig !== undefined && output.dataflowEndpointConfig !== null) {
2037
+ if (output.dataflowEndpointConfig != null) {
2355
2038
  return {
2356
2039
  dataflowEndpointConfig: deserializeAws_restJson1DataflowEndpointConfig(output.dataflowEndpointConfig, context),
2357
2040
  };
2358
2041
  }
2359
- if (output.s3RecordingConfig !== undefined && output.s3RecordingConfig !== null) {
2042
+ if (output.s3RecordingConfig != null) {
2360
2043
  return {
2361
2044
  s3RecordingConfig: deserializeAws_restJson1S3RecordingConfig(output.s3RecordingConfig, context),
2362
2045
  };
2363
2046
  }
2364
- if (output.trackingConfig !== undefined && output.trackingConfig !== null) {
2047
+ if (output.trackingConfig != null) {
2365
2048
  return {
2366
2049
  trackingConfig: deserializeAws_restJson1TrackingConfig(output.trackingConfig, context),
2367
2050
  };
2368
2051
  }
2369
- if (output.uplinkEchoConfig !== undefined && output.uplinkEchoConfig !== null) {
2052
+ if (output.uplinkEchoConfig != null) {
2370
2053
  return {
2371
2054
  uplinkEchoConfig: deserializeAws_restJson1UplinkEchoConfig(output.uplinkEchoConfig, context),
2372
2055
  };