@aws-sdk/client-groundstation 3.202.0 → 3.207.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 (60) hide show
  1. package/dist-cjs/GroundStation.js +75 -0
  2. package/dist-cjs/commands/CreateEphemerisCommand.js +46 -0
  3. package/dist-cjs/commands/DeleteEphemerisCommand.js +46 -0
  4. package/dist-cjs/commands/DescribeEphemerisCommand.js +46 -0
  5. package/dist-cjs/commands/ListEphemeridesCommand.js +46 -0
  6. package/dist-cjs/commands/UpdateEphemerisCommand.js +46 -0
  7. package/dist-cjs/commands/index.js +5 -0
  8. package/dist-cjs/models/models_0.js +129 -2
  9. package/dist-cjs/pagination/ListEphemeridesPaginator.js +36 -0
  10. package/dist-cjs/pagination/index.js +1 -0
  11. package/dist-cjs/protocols/Aws_restJson1.js +468 -1
  12. package/dist-cjs/runtimeConfig.browser.js +0 -3
  13. package/dist-cjs/runtimeConfig.js +0 -3
  14. package/dist-cjs/runtimeConfig.shared.js +3 -0
  15. package/dist-es/GroundStation.js +75 -0
  16. package/dist-es/commands/CreateEphemerisCommand.js +42 -0
  17. package/dist-es/commands/DeleteEphemerisCommand.js +42 -0
  18. package/dist-es/commands/DescribeEphemerisCommand.js +42 -0
  19. package/dist-es/commands/ListEphemeridesCommand.js +42 -0
  20. package/dist-es/commands/UpdateEphemerisCommand.js +42 -0
  21. package/dist-es/commands/index.js +5 -0
  22. package/dist-es/models/models_0.js +108 -0
  23. package/dist-es/pagination/ListEphemeridesPaginator.js +32 -0
  24. package/dist-es/pagination/index.js +1 -0
  25. package/dist-es/protocols/Aws_restJson1.js +457 -1
  26. package/dist-es/runtimeConfig.browser.js +0 -3
  27. package/dist-es/runtimeConfig.js +0 -3
  28. package/dist-es/runtimeConfig.shared.js +3 -0
  29. package/dist-types/GroundStation.d.ts +35 -0
  30. package/dist-types/GroundStationClient.d.ts +7 -2
  31. package/dist-types/commands/CreateEphemerisCommand.d.ts +37 -0
  32. package/dist-types/commands/DeleteEphemerisCommand.d.ts +37 -0
  33. package/dist-types/commands/DescribeEphemerisCommand.d.ts +37 -0
  34. package/dist-types/commands/ListEphemeridesCommand.d.ts +37 -0
  35. package/dist-types/commands/UpdateEphemerisCommand.d.ts +37 -0
  36. package/dist-types/commands/index.d.ts +5 -0
  37. package/dist-types/models/models_0.d.ts +492 -11
  38. package/dist-types/pagination/ListEphemeridesPaginator.d.ts +4 -0
  39. package/dist-types/pagination/index.d.ts +1 -0
  40. package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
  41. package/dist-types/runtimeConfig.browser.d.ts +2 -2
  42. package/dist-types/runtimeConfig.d.ts +2 -2
  43. package/dist-types/runtimeConfig.shared.d.ts +2 -0
  44. package/dist-types/ts3.4/GroundStation.d.ts +85 -0
  45. package/dist-types/ts3.4/GroundStationClient.d.ts +30 -0
  46. package/dist-types/ts3.4/commands/CreateEphemerisCommand.d.ts +37 -0
  47. package/dist-types/ts3.4/commands/DeleteEphemerisCommand.d.ts +37 -0
  48. package/dist-types/ts3.4/commands/DescribeEphemerisCommand.d.ts +38 -0
  49. package/dist-types/ts3.4/commands/ListEphemeridesCommand.d.ts +37 -0
  50. package/dist-types/ts3.4/commands/UpdateEphemerisCommand.d.ts +37 -0
  51. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  52. package/dist-types/ts3.4/models/models_0.d.ts +209 -0
  53. package/dist-types/ts3.4/pagination/ListEphemeridesPaginator.d.ts +11 -0
  54. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  55. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  56. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -2
  57. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -2
  58. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
  59. package/package.json +5 -4
  60. package/CHANGELOG.md +0 -2817
@@ -1,7 +1,7 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { GroundStationServiceException as __BaseException } from "../models/GroundStationServiceException";
4
- import { ConfigTypeData, DependencyException, InvalidParameterException, ResourceLimitExceededException, ResourceNotFoundException, } from "../models/models_0";
4
+ import { ConfigTypeData, DependencyException, EphemerisData, InvalidParameterException, ResourceLimitExceededException, ResourceNotFoundException, } from "../models/models_0";
5
5
  export const serializeAws_restJson1CancelContactCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {};
@@ -63,6 +63,33 @@ export const serializeAws_restJson1CreateDataflowEndpointGroupCommand = async (i
63
63
  body,
64
64
  });
65
65
  };
66
+ export const serializeAws_restJson1CreateEphemerisCommand = async (input, context) => {
67
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
+ const headers = {
69
+ "content-type": "application/json",
70
+ };
71
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ephemeris";
72
+ let body;
73
+ body = JSON.stringify({
74
+ ...(input.enabled != null && { enabled: input.enabled }),
75
+ ...(input.ephemeris != null && { ephemeris: serializeAws_restJson1EphemerisData(input.ephemeris, context) }),
76
+ ...(input.expirationTime != null && { expirationTime: Math.round(input.expirationTime.getTime() / 1000) }),
77
+ ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }),
78
+ ...(input.name != null && { name: input.name }),
79
+ ...(input.priority != null && { priority: input.priority }),
80
+ ...(input.satelliteId != null && { satelliteId: input.satelliteId }),
81
+ ...(input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
82
+ });
83
+ return new __HttpRequest({
84
+ protocol,
85
+ hostname,
86
+ port,
87
+ method: "POST",
88
+ headers,
89
+ path: resolvedPath,
90
+ body,
91
+ });
92
+ };
66
93
  export const serializeAws_restJson1CreateMissionProfileCommand = async (input, context) => {
67
94
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
95
  const headers = {
@@ -131,6 +158,22 @@ export const serializeAws_restJson1DeleteDataflowEndpointGroupCommand = async (i
131
158
  body,
132
159
  });
133
160
  };
161
+ export const serializeAws_restJson1DeleteEphemerisCommand = async (input, context) => {
162
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const headers = {};
164
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ephemeris/{ephemerisId}";
165
+ resolvedPath = __resolvedPath(resolvedPath, input, "ephemerisId", () => input.ephemerisId, "{ephemerisId}", false);
166
+ let body;
167
+ return new __HttpRequest({
168
+ protocol,
169
+ hostname,
170
+ port,
171
+ method: "DELETE",
172
+ headers,
173
+ path: resolvedPath,
174
+ body,
175
+ });
176
+ };
134
177
  export const serializeAws_restJson1DeleteMissionProfileCommand = async (input, context) => {
135
178
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
179
  const headers = {};
@@ -163,6 +206,22 @@ export const serializeAws_restJson1DescribeContactCommand = async (input, contex
163
206
  body,
164
207
  });
165
208
  };
209
+ export const serializeAws_restJson1DescribeEphemerisCommand = async (input, context) => {
210
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
211
+ const headers = {};
212
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ephemeris/{ephemerisId}";
213
+ resolvedPath = __resolvedPath(resolvedPath, input, "ephemerisId", () => input.ephemerisId, "{ephemerisId}", false);
214
+ let body;
215
+ return new __HttpRequest({
216
+ protocol,
217
+ hostname,
218
+ port,
219
+ method: "GET",
220
+ headers,
221
+ path: resolvedPath,
222
+ body,
223
+ });
224
+ };
166
225
  export const serializeAws_restJson1GetConfigCommand = async (input, context) => {
167
226
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
227
  const headers = {};
@@ -317,6 +376,36 @@ export const serializeAws_restJson1ListDataflowEndpointGroupsCommand = async (in
317
376
  body,
318
377
  });
319
378
  };
379
+ export const serializeAws_restJson1ListEphemeridesCommand = async (input, context) => {
380
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
381
+ const headers = {
382
+ "content-type": "application/json",
383
+ };
384
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ephemerides";
385
+ const query = map({
386
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
387
+ nextToken: [, input.nextToken],
388
+ });
389
+ let body;
390
+ body = JSON.stringify({
391
+ ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
392
+ ...(input.satelliteId != null && { satelliteId: input.satelliteId }),
393
+ ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
394
+ ...(input.statusList != null && {
395
+ statusList: serializeAws_restJson1EphemerisStatusList(input.statusList, context),
396
+ }),
397
+ });
398
+ return new __HttpRequest({
399
+ protocol,
400
+ hostname,
401
+ port,
402
+ method: "POST",
403
+ headers,
404
+ path: resolvedPath,
405
+ query,
406
+ body,
407
+ });
408
+ };
320
409
  export const serializeAws_restJson1ListGroundStationsCommand = async (input, context) => {
321
410
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
322
411
  const headers = {};
@@ -483,6 +572,29 @@ export const serializeAws_restJson1UpdateConfigCommand = async (input, context)
483
572
  body,
484
573
  });
485
574
  };
575
+ export const serializeAws_restJson1UpdateEphemerisCommand = async (input, context) => {
576
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
577
+ const headers = {
578
+ "content-type": "application/json",
579
+ };
580
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ephemeris/{ephemerisId}";
581
+ resolvedPath = __resolvedPath(resolvedPath, input, "ephemerisId", () => input.ephemerisId, "{ephemerisId}", false);
582
+ let body;
583
+ body = JSON.stringify({
584
+ ...(input.enabled != null && { enabled: input.enabled }),
585
+ ...(input.name != null && { name: input.name }),
586
+ ...(input.priority != null && { priority: input.priority }),
587
+ });
588
+ return new __HttpRequest({
589
+ protocol,
590
+ hostname,
591
+ port,
592
+ method: "PUT",
593
+ headers,
594
+ path: resolvedPath,
595
+ body,
596
+ });
597
+ };
486
598
  export const serializeAws_restJson1UpdateMissionProfileCommand = async (input, context) => {
487
599
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
488
600
  const headers = {
@@ -643,6 +755,45 @@ const deserializeAws_restJson1CreateDataflowEndpointGroupCommandError = async (o
643
755
  });
644
756
  }
645
757
  };
758
+ export const deserializeAws_restJson1CreateEphemerisCommand = async (output, context) => {
759
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
760
+ return deserializeAws_restJson1CreateEphemerisCommandError(output, context);
761
+ }
762
+ const contents = map({
763
+ $metadata: deserializeMetadata(output),
764
+ });
765
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
766
+ if (data.ephemerisId != null) {
767
+ contents.ephemerisId = __expectString(data.ephemerisId);
768
+ }
769
+ return contents;
770
+ };
771
+ const deserializeAws_restJson1CreateEphemerisCommandError = async (output, context) => {
772
+ const parsedOutput = {
773
+ ...output,
774
+ body: await parseErrorBody(output.body, context),
775
+ };
776
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
777
+ switch (errorCode) {
778
+ case "DependencyException":
779
+ case "com.amazonaws.groundstation#DependencyException":
780
+ throw await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context);
781
+ case "InvalidParameterException":
782
+ case "com.amazonaws.groundstation#InvalidParameterException":
783
+ throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context);
784
+ case "ResourceNotFoundException":
785
+ case "com.amazonaws.groundstation#ResourceNotFoundException":
786
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
787
+ default:
788
+ const parsedBody = parsedOutput.body;
789
+ throwDefaultError({
790
+ output,
791
+ parsedBody,
792
+ exceptionCtor: __BaseException,
793
+ errorCode,
794
+ });
795
+ }
796
+ };
646
797
  export const deserializeAws_restJson1CreateMissionProfileCommand = async (output, context) => {
647
798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
648
799
  return deserializeAws_restJson1CreateMissionProfileCommandError(output, context);
@@ -766,6 +917,45 @@ const deserializeAws_restJson1DeleteDataflowEndpointGroupCommandError = async (o
766
917
  });
767
918
  }
768
919
  };
920
+ export const deserializeAws_restJson1DeleteEphemerisCommand = async (output, context) => {
921
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
922
+ return deserializeAws_restJson1DeleteEphemerisCommandError(output, context);
923
+ }
924
+ const contents = map({
925
+ $metadata: deserializeMetadata(output),
926
+ });
927
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
928
+ if (data.ephemerisId != null) {
929
+ contents.ephemerisId = __expectString(data.ephemerisId);
930
+ }
931
+ return contents;
932
+ };
933
+ const deserializeAws_restJson1DeleteEphemerisCommandError = async (output, context) => {
934
+ const parsedOutput = {
935
+ ...output,
936
+ body: await parseErrorBody(output.body, context),
937
+ };
938
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
939
+ switch (errorCode) {
940
+ case "DependencyException":
941
+ case "com.amazonaws.groundstation#DependencyException":
942
+ throw await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context);
943
+ case "InvalidParameterException":
944
+ case "com.amazonaws.groundstation#InvalidParameterException":
945
+ throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context);
946
+ case "ResourceNotFoundException":
947
+ case "com.amazonaws.groundstation#ResourceNotFoundException":
948
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
949
+ default:
950
+ const parsedBody = parsedOutput.body;
951
+ throwDefaultError({
952
+ output,
953
+ parsedBody,
954
+ exceptionCtor: __BaseException,
955
+ errorCode,
956
+ });
957
+ }
958
+ };
769
959
  export const deserializeAws_restJson1DeleteMissionProfileCommand = async (output, context) => {
770
960
  if (output.statusCode !== 200 && output.statusCode >= 300) {
771
961
  return deserializeAws_restJson1DeleteMissionProfileCommandError(output, context);
@@ -883,6 +1073,72 @@ const deserializeAws_restJson1DescribeContactCommandError = async (output, conte
883
1073
  });
884
1074
  }
885
1075
  };
1076
+ export const deserializeAws_restJson1DescribeEphemerisCommand = async (output, context) => {
1077
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1078
+ return deserializeAws_restJson1DescribeEphemerisCommandError(output, context);
1079
+ }
1080
+ const contents = map({
1081
+ $metadata: deserializeMetadata(output),
1082
+ });
1083
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1084
+ if (data.creationTime != null) {
1085
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1086
+ }
1087
+ if (data.enabled != null) {
1088
+ contents.enabled = __expectBoolean(data.enabled);
1089
+ }
1090
+ if (data.ephemerisId != null) {
1091
+ contents.ephemerisId = __expectString(data.ephemerisId);
1092
+ }
1093
+ if (data.invalidReason != null) {
1094
+ contents.invalidReason = __expectString(data.invalidReason);
1095
+ }
1096
+ if (data.name != null) {
1097
+ contents.name = __expectString(data.name);
1098
+ }
1099
+ if (data.priority != null) {
1100
+ contents.priority = __expectInt32(data.priority);
1101
+ }
1102
+ if (data.satelliteId != null) {
1103
+ contents.satelliteId = __expectString(data.satelliteId);
1104
+ }
1105
+ if (data.status != null) {
1106
+ contents.status = __expectString(data.status);
1107
+ }
1108
+ if (data.suppliedData != null) {
1109
+ contents.suppliedData = deserializeAws_restJson1EphemerisTypeDescription(__expectUnion(data.suppliedData), context);
1110
+ }
1111
+ if (data.tags != null) {
1112
+ contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1113
+ }
1114
+ return contents;
1115
+ };
1116
+ const deserializeAws_restJson1DescribeEphemerisCommandError = async (output, context) => {
1117
+ const parsedOutput = {
1118
+ ...output,
1119
+ body: await parseErrorBody(output.body, context),
1120
+ };
1121
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1122
+ switch (errorCode) {
1123
+ case "DependencyException":
1124
+ case "com.amazonaws.groundstation#DependencyException":
1125
+ throw await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context);
1126
+ case "InvalidParameterException":
1127
+ case "com.amazonaws.groundstation#InvalidParameterException":
1128
+ throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context);
1129
+ case "ResourceNotFoundException":
1130
+ case "com.amazonaws.groundstation#ResourceNotFoundException":
1131
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1132
+ default:
1133
+ const parsedBody = parsedOutput.body;
1134
+ throwDefaultError({
1135
+ output,
1136
+ parsedBody,
1137
+ exceptionCtor: __BaseException,
1138
+ errorCode,
1139
+ });
1140
+ }
1141
+ };
886
1142
  export const deserializeAws_restJson1GetConfigCommand = async (output, context) => {
887
1143
  if (output.statusCode !== 200 && output.statusCode >= 300) {
888
1144
  return deserializeAws_restJson1GetConfigCommandError(output, context);
@@ -1110,6 +1366,9 @@ export const deserializeAws_restJson1GetSatelliteCommand = async (output, contex
1110
1366
  $metadata: deserializeMetadata(output),
1111
1367
  });
1112
1368
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1369
+ if (data.currentEphemeris != null) {
1370
+ contents.currentEphemeris = deserializeAws_restJson1EphemerisMetaData(data.currentEphemeris, context);
1371
+ }
1113
1372
  if (data.groundStations != null) {
1114
1373
  contents.groundStations = deserializeAws_restJson1GroundStationIdList(data.groundStations, context);
1115
1374
  }
@@ -1276,6 +1535,48 @@ const deserializeAws_restJson1ListDataflowEndpointGroupsCommandError = async (ou
1276
1535
  });
1277
1536
  }
1278
1537
  };
1538
+ export const deserializeAws_restJson1ListEphemeridesCommand = async (output, context) => {
1539
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1540
+ return deserializeAws_restJson1ListEphemeridesCommandError(output, context);
1541
+ }
1542
+ const contents = map({
1543
+ $metadata: deserializeMetadata(output),
1544
+ });
1545
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1546
+ if (data.ephemerides != null) {
1547
+ contents.ephemerides = deserializeAws_restJson1EphemeridesList(data.ephemerides, context);
1548
+ }
1549
+ if (data.nextToken != null) {
1550
+ contents.nextToken = __expectString(data.nextToken);
1551
+ }
1552
+ return contents;
1553
+ };
1554
+ const deserializeAws_restJson1ListEphemeridesCommandError = async (output, context) => {
1555
+ const parsedOutput = {
1556
+ ...output,
1557
+ body: await parseErrorBody(output.body, context),
1558
+ };
1559
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1560
+ switch (errorCode) {
1561
+ case "DependencyException":
1562
+ case "com.amazonaws.groundstation#DependencyException":
1563
+ throw await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context);
1564
+ case "InvalidParameterException":
1565
+ case "com.amazonaws.groundstation#InvalidParameterException":
1566
+ throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context);
1567
+ case "ResourceNotFoundException":
1568
+ case "com.amazonaws.groundstation#ResourceNotFoundException":
1569
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1570
+ default:
1571
+ const parsedBody = parsedOutput.body;
1572
+ throwDefaultError({
1573
+ output,
1574
+ parsedBody,
1575
+ exceptionCtor: __BaseException,
1576
+ errorCode,
1577
+ });
1578
+ }
1579
+ };
1279
1580
  export const deserializeAws_restJson1ListGroundStationsCommand = async (output, context) => {
1280
1581
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1281
1582
  return deserializeAws_restJson1ListGroundStationsCommandError(output, context);
@@ -1597,6 +1898,45 @@ const deserializeAws_restJson1UpdateConfigCommandError = async (output, context)
1597
1898
  });
1598
1899
  }
1599
1900
  };
1901
+ export const deserializeAws_restJson1UpdateEphemerisCommand = async (output, context) => {
1902
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1903
+ return deserializeAws_restJson1UpdateEphemerisCommandError(output, context);
1904
+ }
1905
+ const contents = map({
1906
+ $metadata: deserializeMetadata(output),
1907
+ });
1908
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1909
+ if (data.ephemerisId != null) {
1910
+ contents.ephemerisId = __expectString(data.ephemerisId);
1911
+ }
1912
+ return contents;
1913
+ };
1914
+ const deserializeAws_restJson1UpdateEphemerisCommandError = async (output, context) => {
1915
+ const parsedOutput = {
1916
+ ...output,
1917
+ body: await parseErrorBody(output.body, context),
1918
+ };
1919
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1920
+ switch (errorCode) {
1921
+ case "DependencyException":
1922
+ case "com.amazonaws.groundstation#DependencyException":
1923
+ throw await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context);
1924
+ case "InvalidParameterException":
1925
+ case "com.amazonaws.groundstation#InvalidParameterException":
1926
+ throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context);
1927
+ case "ResourceNotFoundException":
1928
+ case "com.amazonaws.groundstation#ResourceNotFoundException":
1929
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1930
+ default:
1931
+ const parsedBody = parsedOutput.body;
1932
+ throwDefaultError({
1933
+ output,
1934
+ parsedBody,
1935
+ exceptionCtor: __BaseException,
1936
+ errorCode,
1937
+ });
1938
+ }
1939
+ };
1600
1940
  export const deserializeAws_restJson1UpdateMissionProfileCommand = async (output, context) => {
1601
1941
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1602
1942
  return deserializeAws_restJson1UpdateMissionProfileCommandError(output, context);
@@ -1802,6 +2142,20 @@ const serializeAws_restJson1EndpointDetailsList = (input, context) => {
1802
2142
  return serializeAws_restJson1EndpointDetails(entry, context);
1803
2143
  });
1804
2144
  };
2145
+ const serializeAws_restJson1EphemerisData = (input, context) => {
2146
+ return EphemerisData.visit(input, {
2147
+ oem: (value) => ({ oem: serializeAws_restJson1OEMEphemeris(value, context) }),
2148
+ tle: (value) => ({ tle: serializeAws_restJson1TLEEphemeris(value, context) }),
2149
+ _: (name, value) => ({ name: value }),
2150
+ });
2151
+ };
2152
+ const serializeAws_restJson1EphemerisStatusList = (input, context) => {
2153
+ return input
2154
+ .filter((e) => e != null)
2155
+ .map((entry) => {
2156
+ return entry;
2157
+ });
2158
+ };
1805
2159
  const serializeAws_restJson1Frequency = (input, context) => {
1806
2160
  return {
1807
2161
  ...(input.units != null && { units: input.units }),
@@ -1814,6 +2168,19 @@ const serializeAws_restJson1FrequencyBandwidth = (input, context) => {
1814
2168
  ...(input.value != null && { value: __serializeFloat(input.value) }),
1815
2169
  };
1816
2170
  };
2171
+ const serializeAws_restJson1OEMEphemeris = (input, context) => {
2172
+ return {
2173
+ ...(input.oemData != null && { oemData: input.oemData }),
2174
+ ...(input.s3Object != null && { s3Object: serializeAws_restJson1S3Object(input.s3Object, context) }),
2175
+ };
2176
+ };
2177
+ const serializeAws_restJson1S3Object = (input, context) => {
2178
+ return {
2179
+ ...(input.bucket != null && { bucket: input.bucket }),
2180
+ ...(input.key != null && { key: input.key }),
2181
+ ...(input.version != null && { version: input.version }),
2182
+ };
2183
+ };
1817
2184
  const serializeAws_restJson1S3RecordingConfig = (input, context) => {
1818
2185
  return {
1819
2186
  ...(input.bucketArn != null && { bucketArn: input.bucketArn }),
@@ -1877,6 +2244,34 @@ const serializeAws_restJson1TagsMap = (input, context) => {
1877
2244
  };
1878
2245
  }, {});
1879
2246
  };
2247
+ const serializeAws_restJson1TimeRange = (input, context) => {
2248
+ return {
2249
+ ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
2250
+ ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
2251
+ };
2252
+ };
2253
+ const serializeAws_restJson1TLEData = (input, context) => {
2254
+ return {
2255
+ ...(input.tleLine1 != null && { tleLine1: input.tleLine1 }),
2256
+ ...(input.tleLine2 != null && { tleLine2: input.tleLine2 }),
2257
+ ...(input.validTimeRange != null && {
2258
+ validTimeRange: serializeAws_restJson1TimeRange(input.validTimeRange, context),
2259
+ }),
2260
+ };
2261
+ };
2262
+ const serializeAws_restJson1TLEDataList = (input, context) => {
2263
+ return input
2264
+ .filter((e) => e != null)
2265
+ .map((entry) => {
2266
+ return serializeAws_restJson1TLEData(entry, context);
2267
+ });
2268
+ };
2269
+ const serializeAws_restJson1TLEEphemeris = (input, context) => {
2270
+ return {
2271
+ ...(input.s3Object != null && { s3Object: serializeAws_restJson1S3Object(input.s3Object, context) }),
2272
+ ...(input.tleData != null && { tleData: serializeAws_restJson1TLEDataList(input.tleData, context) }),
2273
+ };
2274
+ };
1880
2275
  const serializeAws_restJson1TrackingConfig = (input, context) => {
1881
2276
  return {
1882
2277
  ...(input.autotrack != null && { autotrack: input.autotrack }),
@@ -2157,6 +2552,57 @@ const deserializeAws_restJson1EndpointDetailsList = (output, context) => {
2157
2552
  });
2158
2553
  return retVal;
2159
2554
  };
2555
+ const deserializeAws_restJson1EphemeridesList = (output, context) => {
2556
+ const retVal = (output || [])
2557
+ .filter((e) => e != null)
2558
+ .map((entry) => {
2559
+ if (entry === null) {
2560
+ return null;
2561
+ }
2562
+ return deserializeAws_restJson1EphemerisItem(entry, context);
2563
+ });
2564
+ return retVal;
2565
+ };
2566
+ const deserializeAws_restJson1EphemerisDescription = (output, context) => {
2567
+ return {
2568
+ ephemerisData: __expectString(output.ephemerisData),
2569
+ sourceS3Object: output.sourceS3Object != null ? deserializeAws_restJson1S3Object(output.sourceS3Object, context) : undefined,
2570
+ };
2571
+ };
2572
+ const deserializeAws_restJson1EphemerisItem = (output, context) => {
2573
+ return {
2574
+ creationTime: output.creationTime != null
2575
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2576
+ : undefined,
2577
+ enabled: __expectBoolean(output.enabled),
2578
+ ephemerisId: __expectString(output.ephemerisId),
2579
+ name: __expectString(output.name),
2580
+ priority: __expectInt32(output.priority),
2581
+ sourceS3Object: output.sourceS3Object != null ? deserializeAws_restJson1S3Object(output.sourceS3Object, context) : undefined,
2582
+ status: __expectString(output.status),
2583
+ };
2584
+ };
2585
+ const deserializeAws_restJson1EphemerisMetaData = (output, context) => {
2586
+ return {
2587
+ ephemerisId: __expectString(output.ephemerisId),
2588
+ epoch: output.epoch != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.epoch))) : undefined,
2589
+ name: __expectString(output.name),
2590
+ source: __expectString(output.source),
2591
+ };
2592
+ };
2593
+ const deserializeAws_restJson1EphemerisTypeDescription = (output, context) => {
2594
+ if (output.oem != null) {
2595
+ return {
2596
+ oem: deserializeAws_restJson1EphemerisDescription(output.oem, context),
2597
+ };
2598
+ }
2599
+ if (output.tle != null) {
2600
+ return {
2601
+ tle: deserializeAws_restJson1EphemerisDescription(output.tle, context),
2602
+ };
2603
+ }
2604
+ return { $unknown: Object.entries(output)[0] };
2605
+ };
2160
2606
  const deserializeAws_restJson1Frequency = (output, context) => {
2161
2607
  return {
2162
2608
  units: __expectString(output.units),
@@ -2217,6 +2663,13 @@ const deserializeAws_restJson1MissionProfileListItem = (output, context) => {
2217
2663
  region: __expectString(output.region),
2218
2664
  };
2219
2665
  };
2666
+ const deserializeAws_restJson1S3Object = (output, context) => {
2667
+ return {
2668
+ bucket: __expectString(output.bucket),
2669
+ key: __expectString(output.key),
2670
+ version: __expectString(output.version),
2671
+ };
2672
+ };
2220
2673
  const deserializeAws_restJson1S3RecordingConfig = (output, context) => {
2221
2674
  return {
2222
2675
  bucketArn: __expectString(output.bucketArn),
@@ -2243,6 +2696,9 @@ const deserializeAws_restJson1SatelliteList = (output, context) => {
2243
2696
  };
2244
2697
  const deserializeAws_restJson1SatelliteListItem = (output, context) => {
2245
2698
  return {
2699
+ currentEphemeris: output.currentEphemeris != null
2700
+ ? deserializeAws_restJson1EphemerisMetaData(output.currentEphemeris, context)
2701
+ : undefined,
2246
2702
  groundStations: output.groundStations != null
2247
2703
  ? deserializeAws_restJson1GroundStationIdList(output.groundStations, context)
2248
2704
  : undefined,
@@ -4,7 +4,6 @@ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-
4
4
  import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
5
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
6
6
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
7
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
8
7
  import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
9
8
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
10
9
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
@@ -20,8 +19,6 @@ export const getRuntimeConfig = (config) => {
20
19
  ...config,
21
20
  runtime: "browser",
22
21
  defaultsMode,
23
- base64Decoder: config?.base64Decoder ?? fromBase64,
24
- base64Encoder: config?.base64Encoder ?? toBase64,
25
22
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
26
23
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
24
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -6,7 +6,6 @@ import { Hash } from "@aws-sdk/hash-node";
6
6
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
7
7
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
8
8
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
10
9
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
11
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
12
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
@@ -24,8 +23,6 @@ export const getRuntimeConfig = (config) => {
24
23
  ...config,
25
24
  runtime: "node",
26
25
  defaultsMode,
27
- base64Decoder: config?.base64Decoder ?? fromBase64,
28
- base64Encoder: config?.base64Encoder ?? toBase64,
29
26
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
27
  credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
31
28
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -1,7 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
+ import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
2
3
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
3
4
  export const getRuntimeConfig = (config) => ({
4
5
  apiVersion: "2019-05-23",
6
+ base64Decoder: config?.base64Decoder ?? fromBase64,
7
+ base64Encoder: config?.base64Encoder ?? toBase64,
5
8
  disableHostPrefix: config?.disableHostPrefix ?? false,
6
9
  endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
7
10
  logger: config?.logger ?? {},