@aws-sdk/client-groundstation 3.35.0 → 3.36.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 (221) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist-cjs/GroundStation.js +0 -1
  3. package/dist-cjs/GroundStationClient.js +0 -1
  4. package/dist-cjs/commands/CancelContactCommand.js +0 -1
  5. package/dist-cjs/commands/CreateConfigCommand.js +0 -1
  6. package/dist-cjs/commands/CreateDataflowEndpointGroupCommand.js +0 -1
  7. package/dist-cjs/commands/CreateMissionProfileCommand.js +0 -1
  8. package/dist-cjs/commands/DeleteConfigCommand.js +0 -1
  9. package/dist-cjs/commands/DeleteDataflowEndpointGroupCommand.js +0 -1
  10. package/dist-cjs/commands/DeleteMissionProfileCommand.js +0 -1
  11. package/dist-cjs/commands/DescribeContactCommand.js +0 -1
  12. package/dist-cjs/commands/GetConfigCommand.js +0 -1
  13. package/dist-cjs/commands/GetDataflowEndpointGroupCommand.js +0 -1
  14. package/dist-cjs/commands/GetMinuteUsageCommand.js +0 -1
  15. package/dist-cjs/commands/GetMissionProfileCommand.js +0 -1
  16. package/dist-cjs/commands/GetSatelliteCommand.js +0 -1
  17. package/dist-cjs/commands/ListConfigsCommand.js +0 -1
  18. package/dist-cjs/commands/ListContactsCommand.js +0 -1
  19. package/dist-cjs/commands/ListDataflowEndpointGroupsCommand.js +0 -1
  20. package/dist-cjs/commands/ListGroundStationsCommand.js +0 -1
  21. package/dist-cjs/commands/ListMissionProfilesCommand.js +0 -1
  22. package/dist-cjs/commands/ListSatellitesCommand.js +0 -1
  23. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
  24. package/dist-cjs/commands/ReserveContactCommand.js +0 -1
  25. package/dist-cjs/commands/TagResourceCommand.js +0 -1
  26. package/dist-cjs/commands/UntagResourceCommand.js +0 -1
  27. package/dist-cjs/commands/UpdateConfigCommand.js +0 -1
  28. package/dist-cjs/commands/UpdateMissionProfileCommand.js +0 -1
  29. package/dist-cjs/endpoints.js +0 -1
  30. package/dist-cjs/index.js +0 -1
  31. package/dist-cjs/models/index.js +0 -1
  32. package/dist-cjs/models/models_0.js +0 -1
  33. package/dist-cjs/pagination/Interfaces.js +0 -1
  34. package/dist-cjs/pagination/ListConfigsPaginator.js +0 -1
  35. package/dist-cjs/pagination/ListContactsPaginator.js +0 -1
  36. package/dist-cjs/pagination/ListDataflowEndpointGroupsPaginator.js +0 -1
  37. package/dist-cjs/pagination/ListGroundStationsPaginator.js +0 -1
  38. package/dist-cjs/pagination/ListMissionProfilesPaginator.js +0 -1
  39. package/dist-cjs/pagination/ListSatellitesPaginator.js +0 -1
  40. package/dist-cjs/protocols/Aws_restJson1.js +0 -1
  41. package/dist-cjs/runtimeConfig.browser.js +2 -3
  42. package/dist-cjs/runtimeConfig.js +3 -4
  43. package/dist-cjs/runtimeConfig.native.js +0 -1
  44. package/dist-cjs/runtimeConfig.shared.js +0 -1
  45. package/dist-es/GroundStation.js +0 -1
  46. package/dist-es/GroundStationClient.js +0 -1
  47. package/dist-es/commands/CancelContactCommand.js +0 -1
  48. package/dist-es/commands/CreateConfigCommand.js +0 -1
  49. package/dist-es/commands/CreateDataflowEndpointGroupCommand.js +0 -1
  50. package/dist-es/commands/CreateMissionProfileCommand.js +0 -1
  51. package/dist-es/commands/DeleteConfigCommand.js +0 -1
  52. package/dist-es/commands/DeleteDataflowEndpointGroupCommand.js +0 -1
  53. package/dist-es/commands/DeleteMissionProfileCommand.js +0 -1
  54. package/dist-es/commands/DescribeContactCommand.js +0 -1
  55. package/dist-es/commands/GetConfigCommand.js +0 -1
  56. package/dist-es/commands/GetDataflowEndpointGroupCommand.js +0 -1
  57. package/dist-es/commands/GetMinuteUsageCommand.js +0 -1
  58. package/dist-es/commands/GetMissionProfileCommand.js +0 -1
  59. package/dist-es/commands/GetSatelliteCommand.js +0 -1
  60. package/dist-es/commands/ListConfigsCommand.js +0 -1
  61. package/dist-es/commands/ListContactsCommand.js +0 -1
  62. package/dist-es/commands/ListDataflowEndpointGroupsCommand.js +0 -1
  63. package/dist-es/commands/ListGroundStationsCommand.js +0 -1
  64. package/dist-es/commands/ListMissionProfilesCommand.js +0 -1
  65. package/dist-es/commands/ListSatellitesCommand.js +0 -1
  66. package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
  67. package/dist-es/commands/ReserveContactCommand.js +0 -1
  68. package/dist-es/commands/TagResourceCommand.js +0 -1
  69. package/dist-es/commands/UntagResourceCommand.js +0 -1
  70. package/dist-es/commands/UpdateConfigCommand.js +0 -1
  71. package/dist-es/commands/UpdateMissionProfileCommand.js +0 -1
  72. package/dist-es/endpoints.js +0 -1
  73. package/dist-es/index.js +0 -1
  74. package/dist-es/models/index.js +0 -1
  75. package/dist-es/models/models_0.js +0 -1
  76. package/dist-es/pagination/Interfaces.js +0 -1
  77. package/dist-es/pagination/ListConfigsPaginator.js +0 -1
  78. package/dist-es/pagination/ListContactsPaginator.js +0 -1
  79. package/dist-es/pagination/ListDataflowEndpointGroupsPaginator.js +0 -1
  80. package/dist-es/pagination/ListGroundStationsPaginator.js +0 -1
  81. package/dist-es/pagination/ListMissionProfilesPaginator.js +0 -1
  82. package/dist-es/pagination/ListSatellitesPaginator.js +0 -1
  83. package/dist-es/protocols/Aws_restJson1.js +0 -1
  84. package/dist-es/runtimeConfig.browser.js +1 -2
  85. package/dist-es/runtimeConfig.js +2 -3
  86. package/dist-es/runtimeConfig.native.js +0 -1
  87. package/dist-es/runtimeConfig.shared.js +0 -1
  88. package/package.json +33 -30
  89. package/dist-cjs/GroundStation.js.map +0 -1
  90. package/dist-cjs/GroundStationClient.js.map +0 -1
  91. package/dist-cjs/commands/CancelContactCommand.js.map +0 -1
  92. package/dist-cjs/commands/CreateConfigCommand.js.map +0 -1
  93. package/dist-cjs/commands/CreateDataflowEndpointGroupCommand.js.map +0 -1
  94. package/dist-cjs/commands/CreateMissionProfileCommand.js.map +0 -1
  95. package/dist-cjs/commands/DeleteConfigCommand.js.map +0 -1
  96. package/dist-cjs/commands/DeleteDataflowEndpointGroupCommand.js.map +0 -1
  97. package/dist-cjs/commands/DeleteMissionProfileCommand.js.map +0 -1
  98. package/dist-cjs/commands/DescribeContactCommand.js.map +0 -1
  99. package/dist-cjs/commands/GetConfigCommand.js.map +0 -1
  100. package/dist-cjs/commands/GetDataflowEndpointGroupCommand.js.map +0 -1
  101. package/dist-cjs/commands/GetMinuteUsageCommand.js.map +0 -1
  102. package/dist-cjs/commands/GetMissionProfileCommand.js.map +0 -1
  103. package/dist-cjs/commands/GetSatelliteCommand.js.map +0 -1
  104. package/dist-cjs/commands/ListConfigsCommand.js.map +0 -1
  105. package/dist-cjs/commands/ListContactsCommand.js.map +0 -1
  106. package/dist-cjs/commands/ListDataflowEndpointGroupsCommand.js.map +0 -1
  107. package/dist-cjs/commands/ListGroundStationsCommand.js.map +0 -1
  108. package/dist-cjs/commands/ListMissionProfilesCommand.js.map +0 -1
  109. package/dist-cjs/commands/ListSatellitesCommand.js.map +0 -1
  110. package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
  111. package/dist-cjs/commands/ReserveContactCommand.js.map +0 -1
  112. package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
  113. package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
  114. package/dist-cjs/commands/UpdateConfigCommand.js.map +0 -1
  115. package/dist-cjs/commands/UpdateMissionProfileCommand.js.map +0 -1
  116. package/dist-cjs/endpoints.js.map +0 -1
  117. package/dist-cjs/index.js.map +0 -1
  118. package/dist-cjs/models/index.js.map +0 -1
  119. package/dist-cjs/models/models_0.js.map +0 -1
  120. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  121. package/dist-cjs/pagination/ListConfigsPaginator.js.map +0 -1
  122. package/dist-cjs/pagination/ListContactsPaginator.js.map +0 -1
  123. package/dist-cjs/pagination/ListDataflowEndpointGroupsPaginator.js.map +0 -1
  124. package/dist-cjs/pagination/ListGroundStationsPaginator.js.map +0 -1
  125. package/dist-cjs/pagination/ListMissionProfilesPaginator.js.map +0 -1
  126. package/dist-cjs/pagination/ListSatellitesPaginator.js.map +0 -1
  127. package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
  128. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  129. package/dist-cjs/runtimeConfig.js.map +0 -1
  130. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  131. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  132. package/dist-es/GroundStation.js.map +0 -1
  133. package/dist-es/GroundStationClient.js.map +0 -1
  134. package/dist-es/commands/CancelContactCommand.js.map +0 -1
  135. package/dist-es/commands/CreateConfigCommand.js.map +0 -1
  136. package/dist-es/commands/CreateDataflowEndpointGroupCommand.js.map +0 -1
  137. package/dist-es/commands/CreateMissionProfileCommand.js.map +0 -1
  138. package/dist-es/commands/DeleteConfigCommand.js.map +0 -1
  139. package/dist-es/commands/DeleteDataflowEndpointGroupCommand.js.map +0 -1
  140. package/dist-es/commands/DeleteMissionProfileCommand.js.map +0 -1
  141. package/dist-es/commands/DescribeContactCommand.js.map +0 -1
  142. package/dist-es/commands/GetConfigCommand.js.map +0 -1
  143. package/dist-es/commands/GetDataflowEndpointGroupCommand.js.map +0 -1
  144. package/dist-es/commands/GetMinuteUsageCommand.js.map +0 -1
  145. package/dist-es/commands/GetMissionProfileCommand.js.map +0 -1
  146. package/dist-es/commands/GetSatelliteCommand.js.map +0 -1
  147. package/dist-es/commands/ListConfigsCommand.js.map +0 -1
  148. package/dist-es/commands/ListContactsCommand.js.map +0 -1
  149. package/dist-es/commands/ListDataflowEndpointGroupsCommand.js.map +0 -1
  150. package/dist-es/commands/ListGroundStationsCommand.js.map +0 -1
  151. package/dist-es/commands/ListMissionProfilesCommand.js.map +0 -1
  152. package/dist-es/commands/ListSatellitesCommand.js.map +0 -1
  153. package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
  154. package/dist-es/commands/ReserveContactCommand.js.map +0 -1
  155. package/dist-es/commands/TagResourceCommand.js.map +0 -1
  156. package/dist-es/commands/UntagResourceCommand.js.map +0 -1
  157. package/dist-es/commands/UpdateConfigCommand.js.map +0 -1
  158. package/dist-es/commands/UpdateMissionProfileCommand.js.map +0 -1
  159. package/dist-es/endpoints.js.map +0 -1
  160. package/dist-es/index.js.map +0 -1
  161. package/dist-es/models/index.js.map +0 -1
  162. package/dist-es/models/models_0.js.map +0 -1
  163. package/dist-es/pagination/Interfaces.js.map +0 -1
  164. package/dist-es/pagination/ListConfigsPaginator.js.map +0 -1
  165. package/dist-es/pagination/ListContactsPaginator.js.map +0 -1
  166. package/dist-es/pagination/ListDataflowEndpointGroupsPaginator.js.map +0 -1
  167. package/dist-es/pagination/ListGroundStationsPaginator.js.map +0 -1
  168. package/dist-es/pagination/ListMissionProfilesPaginator.js.map +0 -1
  169. package/dist-es/pagination/ListSatellitesPaginator.js.map +0 -1
  170. package/dist-es/protocols/Aws_restJson1.js.map +0 -1
  171. package/dist-es/runtimeConfig.browser.js.map +0 -1
  172. package/dist-es/runtimeConfig.js.map +0 -1
  173. package/dist-es/runtimeConfig.native.js.map +0 -1
  174. package/dist-es/runtimeConfig.shared.js.map +0 -1
  175. package/jest.config.js +0 -4
  176. package/src/GroundStation.ts +0 -907
  177. package/src/GroundStationClient.ts +0 -341
  178. package/src/commands/CancelContactCommand.ts +0 -95
  179. package/src/commands/CreateConfigCommand.ts +0 -96
  180. package/src/commands/CreateDataflowEndpointGroupCommand.ts +0 -102
  181. package/src/commands/CreateMissionProfileCommand.ts +0 -98
  182. package/src/commands/DeleteConfigCommand.ts +0 -95
  183. package/src/commands/DeleteDataflowEndpointGroupCommand.ts +0 -98
  184. package/src/commands/DeleteMissionProfileCommand.ts +0 -95
  185. package/src/commands/DescribeContactCommand.ts +0 -95
  186. package/src/commands/GetConfigCommand.ts +0 -96
  187. package/src/commands/GetDataflowEndpointGroupCommand.ts +0 -95
  188. package/src/commands/GetMinuteUsageCommand.ts +0 -95
  189. package/src/commands/GetMissionProfileCommand.ts +0 -95
  190. package/src/commands/GetSatelliteCommand.ts +0 -95
  191. package/src/commands/ListConfigsCommand.ts +0 -95
  192. package/src/commands/ListContactsCommand.ts +0 -98
  193. package/src/commands/ListDataflowEndpointGroupsCommand.ts +0 -98
  194. package/src/commands/ListGroundStationsCommand.ts +0 -95
  195. package/src/commands/ListMissionProfilesCommand.ts +0 -95
  196. package/src/commands/ListSatellitesCommand.ts +0 -95
  197. package/src/commands/ListTagsForResourceCommand.ts +0 -95
  198. package/src/commands/ReserveContactCommand.ts +0 -95
  199. package/src/commands/TagResourceCommand.ts +0 -95
  200. package/src/commands/UntagResourceCommand.ts +0 -95
  201. package/src/commands/UpdateConfigCommand.ts +0 -97
  202. package/src/commands/UpdateMissionProfileCommand.ts +0 -97
  203. package/src/endpoints.ts +0 -73
  204. package/src/index.ts +0 -35
  205. package/src/models/index.ts +0 -1
  206. package/src/models/models_0.ts +0 -2545
  207. package/src/pagination/Interfaces.ts +0 -8
  208. package/src/pagination/ListConfigsPaginator.ts +0 -55
  209. package/src/pagination/ListContactsPaginator.ts +0 -59
  210. package/src/pagination/ListDataflowEndpointGroupsPaginator.ts +0 -59
  211. package/src/pagination/ListGroundStationsPaginator.ts +0 -59
  212. package/src/pagination/ListMissionProfilesPaginator.ts +0 -59
  213. package/src/pagination/ListSatellitesPaginator.ts +0 -59
  214. package/src/protocols/Aws_restJson1.ts +0 -3832
  215. package/src/runtimeConfig.browser.ts +0 -41
  216. package/src/runtimeConfig.native.ts +0 -17
  217. package/src/runtimeConfig.shared.ts +0 -17
  218. package/src/runtimeConfig.ts +0 -46
  219. package/tsconfig.es.json +0 -10
  220. package/tsconfig.json +0 -33
  221. package/tsconfig.types.json +0 -9
@@ -1,3832 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
- import {
3
- expectBoolean as __expectBoolean,
4
- expectInt32 as __expectInt32,
5
- expectNonNull as __expectNonNull,
6
- expectNumber as __expectNumber,
7
- expectObject as __expectObject,
8
- expectString as __expectString,
9
- expectUnion as __expectUnion,
10
- extendedEncodeURIComponent as __extendedEncodeURIComponent,
11
- limitedParseDouble as __limitedParseDouble,
12
- parseEpochTimestamp as __parseEpochTimestamp,
13
- serializeFloat as __serializeFloat,
14
- } from "@aws-sdk/smithy-client";
15
- import {
16
- Endpoint as __Endpoint,
17
- MetadataBearer as __MetadataBearer,
18
- ResponseMetadata as __ResponseMetadata,
19
- SerdeContext as __SerdeContext,
20
- SmithyException as __SmithyException,
21
- } from "@aws-sdk/types";
22
-
23
- import { CancelContactCommandInput, CancelContactCommandOutput } from "../commands/CancelContactCommand";
24
- import { CreateConfigCommandInput, CreateConfigCommandOutput } from "../commands/CreateConfigCommand";
25
- import {
26
- CreateDataflowEndpointGroupCommandInput,
27
- CreateDataflowEndpointGroupCommandOutput,
28
- } from "../commands/CreateDataflowEndpointGroupCommand";
29
- import {
30
- CreateMissionProfileCommandInput,
31
- CreateMissionProfileCommandOutput,
32
- } from "../commands/CreateMissionProfileCommand";
33
- import { DeleteConfigCommandInput, DeleteConfigCommandOutput } from "../commands/DeleteConfigCommand";
34
- import {
35
- DeleteDataflowEndpointGroupCommandInput,
36
- DeleteDataflowEndpointGroupCommandOutput,
37
- } from "../commands/DeleteDataflowEndpointGroupCommand";
38
- import {
39
- DeleteMissionProfileCommandInput,
40
- DeleteMissionProfileCommandOutput,
41
- } from "../commands/DeleteMissionProfileCommand";
42
- import { DescribeContactCommandInput, DescribeContactCommandOutput } from "../commands/DescribeContactCommand";
43
- import { GetConfigCommandInput, GetConfigCommandOutput } from "../commands/GetConfigCommand";
44
- import {
45
- GetDataflowEndpointGroupCommandInput,
46
- GetDataflowEndpointGroupCommandOutput,
47
- } from "../commands/GetDataflowEndpointGroupCommand";
48
- import { GetMinuteUsageCommandInput, GetMinuteUsageCommandOutput } from "../commands/GetMinuteUsageCommand";
49
- import { GetMissionProfileCommandInput, GetMissionProfileCommandOutput } from "../commands/GetMissionProfileCommand";
50
- import { GetSatelliteCommandInput, GetSatelliteCommandOutput } from "../commands/GetSatelliteCommand";
51
- import { ListConfigsCommandInput, ListConfigsCommandOutput } from "../commands/ListConfigsCommand";
52
- import { ListContactsCommandInput, ListContactsCommandOutput } from "../commands/ListContactsCommand";
53
- import {
54
- ListDataflowEndpointGroupsCommandInput,
55
- ListDataflowEndpointGroupsCommandOutput,
56
- } from "../commands/ListDataflowEndpointGroupsCommand";
57
- import { ListGroundStationsCommandInput, ListGroundStationsCommandOutput } from "../commands/ListGroundStationsCommand";
58
- import {
59
- ListMissionProfilesCommandInput,
60
- ListMissionProfilesCommandOutput,
61
- } from "../commands/ListMissionProfilesCommand";
62
- import { ListSatellitesCommandInput, ListSatellitesCommandOutput } from "../commands/ListSatellitesCommand";
63
- import {
64
- ListTagsForResourceCommandInput,
65
- ListTagsForResourceCommandOutput,
66
- } from "../commands/ListTagsForResourceCommand";
67
- import { ReserveContactCommandInput, ReserveContactCommandOutput } from "../commands/ReserveContactCommand";
68
- import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
69
- import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
70
- import { UpdateConfigCommandInput, UpdateConfigCommandOutput } from "../commands/UpdateConfigCommand";
71
- import {
72
- UpdateMissionProfileCommandInput,
73
- UpdateMissionProfileCommandOutput,
74
- } from "../commands/UpdateMissionProfileCommand";
75
- import {
76
- AntennaDemodDecodeDetails,
77
- AntennaDownlinkConfig,
78
- AntennaDownlinkDemodDecodeConfig,
79
- AntennaUplinkConfig,
80
- ConfigDetails,
81
- ConfigListItem,
82
- ConfigTypeData,
83
- ContactData,
84
- ContactStatus,
85
- DataflowDetail,
86
- DataflowEndpoint,
87
- DataflowEndpointConfig,
88
- DataflowEndpointListItem,
89
- DecodeConfig,
90
- DemodulationConfig,
91
- DependencyException,
92
- Destination,
93
- Eirp,
94
- Elevation,
95
- EndpointDetails,
96
- Frequency,
97
- FrequencyBandwidth,
98
- GroundStationData,
99
- InvalidParameterException,
100
- MissionProfileListItem,
101
- ResourceLimitExceededException,
102
- ResourceNotFoundException,
103
- S3RecordingConfig,
104
- S3RecordingDetails,
105
- SatelliteListItem,
106
- SecurityDetails,
107
- SocketAddress,
108
- Source,
109
- SpectrumConfig,
110
- TrackingConfig,
111
- UplinkEchoConfig,
112
- UplinkSpectrumConfig,
113
- } from "../models/models_0";
114
-
115
- export const serializeAws_restJson1CancelContactCommand = async (
116
- input: CancelContactCommandInput,
117
- context: __SerdeContext
118
- ): Promise<__HttpRequest> => {
119
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
- const headers: any = {};
121
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/{contactId}";
122
- if (input.contactId !== undefined) {
123
- const labelValue: string = input.contactId;
124
- if (labelValue.length <= 0) {
125
- throw new Error("Empty value provided for input HTTP label: contactId.");
126
- }
127
- resolvedPath = resolvedPath.replace("{contactId}", __extendedEncodeURIComponent(labelValue));
128
- } else {
129
- throw new Error("No value provided for input HTTP label: contactId.");
130
- }
131
- let body: any;
132
- return new __HttpRequest({
133
- protocol,
134
- hostname,
135
- port,
136
- method: "DELETE",
137
- headers,
138
- path: resolvedPath,
139
- body,
140
- });
141
- };
142
-
143
- export const serializeAws_restJson1CreateConfigCommand = async (
144
- input: CreateConfigCommandInput,
145
- context: __SerdeContext
146
- ): Promise<__HttpRequest> => {
147
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
- const headers: any = {
149
- "content-type": "application/json",
150
- };
151
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/config";
152
- let body: any;
153
- body = JSON.stringify({
154
- ...(input.configData !== undefined &&
155
- input.configData !== null && { configData: serializeAws_restJson1ConfigTypeData(input.configData, context) }),
156
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
157
- ...(input.tags !== undefined &&
158
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
159
- });
160
- return new __HttpRequest({
161
- protocol,
162
- hostname,
163
- port,
164
- method: "POST",
165
- headers,
166
- path: resolvedPath,
167
- body,
168
- });
169
- };
170
-
171
- export const serializeAws_restJson1CreateDataflowEndpointGroupCommand = async (
172
- input: CreateDataflowEndpointGroupCommandInput,
173
- context: __SerdeContext
174
- ): Promise<__HttpRequest> => {
175
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
176
- const headers: any = {
177
- "content-type": "application/json",
178
- };
179
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataflowEndpointGroup";
180
- let body: any;
181
- body = JSON.stringify({
182
- ...(input.endpointDetails !== undefined &&
183
- input.endpointDetails !== null && {
184
- endpointDetails: serializeAws_restJson1EndpointDetailsList(input.endpointDetails, context),
185
- }),
186
- ...(input.tags !== undefined &&
187
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
188
- });
189
- return new __HttpRequest({
190
- protocol,
191
- hostname,
192
- port,
193
- method: "POST",
194
- headers,
195
- path: resolvedPath,
196
- body,
197
- });
198
- };
199
-
200
- export const serializeAws_restJson1CreateMissionProfileCommand = async (
201
- input: CreateMissionProfileCommandInput,
202
- context: __SerdeContext
203
- ): Promise<__HttpRequest> => {
204
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
- const headers: any = {
206
- "content-type": "application/json",
207
- };
208
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile";
209
- let body: any;
210
- body = JSON.stringify({
211
- ...(input.contactPostPassDurationSeconds !== undefined &&
212
- input.contactPostPassDurationSeconds !== null && {
213
- contactPostPassDurationSeconds: input.contactPostPassDurationSeconds,
214
- }),
215
- ...(input.contactPrePassDurationSeconds !== undefined &&
216
- input.contactPrePassDurationSeconds !== null && {
217
- contactPrePassDurationSeconds: input.contactPrePassDurationSeconds,
218
- }),
219
- ...(input.dataflowEdges !== undefined &&
220
- input.dataflowEdges !== null && {
221
- dataflowEdges: serializeAws_restJson1DataflowEdgeList(input.dataflowEdges, context),
222
- }),
223
- ...(input.minimumViableContactDurationSeconds !== undefined &&
224
- input.minimumViableContactDurationSeconds !== null && {
225
- minimumViableContactDurationSeconds: input.minimumViableContactDurationSeconds,
226
- }),
227
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
228
- ...(input.tags !== undefined &&
229
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
230
- ...(input.trackingConfigArn !== undefined &&
231
- input.trackingConfigArn !== null && { trackingConfigArn: input.trackingConfigArn }),
232
- });
233
- return new __HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "POST",
238
- headers,
239
- path: resolvedPath,
240
- body,
241
- });
242
- };
243
-
244
- export const serializeAws_restJson1DeleteConfigCommand = async (
245
- input: DeleteConfigCommandInput,
246
- context: __SerdeContext
247
- ): Promise<__HttpRequest> => {
248
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
- const headers: any = {};
250
- let resolvedPath =
251
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/config/{configType}/{configId}";
252
- if (input.configId !== undefined) {
253
- const labelValue: string = input.configId;
254
- if (labelValue.length <= 0) {
255
- throw new Error("Empty value provided for input HTTP label: configId.");
256
- }
257
- resolvedPath = resolvedPath.replace("{configId}", __extendedEncodeURIComponent(labelValue));
258
- } else {
259
- throw new Error("No value provided for input HTTP label: configId.");
260
- }
261
- if (input.configType !== undefined) {
262
- const labelValue: string = input.configType;
263
- if (labelValue.length <= 0) {
264
- throw new Error("Empty value provided for input HTTP label: configType.");
265
- }
266
- resolvedPath = resolvedPath.replace("{configType}", __extendedEncodeURIComponent(labelValue));
267
- } else {
268
- throw new Error("No value provided for input HTTP label: configType.");
269
- }
270
- let body: any;
271
- return new __HttpRequest({
272
- protocol,
273
- hostname,
274
- port,
275
- method: "DELETE",
276
- headers,
277
- path: resolvedPath,
278
- body,
279
- });
280
- };
281
-
282
- export const serializeAws_restJson1DeleteDataflowEndpointGroupCommand = async (
283
- input: DeleteDataflowEndpointGroupCommandInput,
284
- context: __SerdeContext
285
- ): Promise<__HttpRequest> => {
286
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
287
- const headers: any = {};
288
- let resolvedPath =
289
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
290
- "/dataflowEndpointGroup/{dataflowEndpointGroupId}";
291
- if (input.dataflowEndpointGroupId !== undefined) {
292
- const labelValue: string = input.dataflowEndpointGroupId;
293
- if (labelValue.length <= 0) {
294
- throw new Error("Empty value provided for input HTTP label: dataflowEndpointGroupId.");
295
- }
296
- resolvedPath = resolvedPath.replace("{dataflowEndpointGroupId}", __extendedEncodeURIComponent(labelValue));
297
- } else {
298
- throw new Error("No value provided for input HTTP label: dataflowEndpointGroupId.");
299
- }
300
- let body: any;
301
- return new __HttpRequest({
302
- protocol,
303
- hostname,
304
- port,
305
- method: "DELETE",
306
- headers,
307
- path: resolvedPath,
308
- body,
309
- });
310
- };
311
-
312
- export const serializeAws_restJson1DeleteMissionProfileCommand = async (
313
- input: DeleteMissionProfileCommandInput,
314
- context: __SerdeContext
315
- ): Promise<__HttpRequest> => {
316
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
317
- const headers: any = {};
318
- let resolvedPath =
319
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile/{missionProfileId}";
320
- if (input.missionProfileId !== undefined) {
321
- const labelValue: string = 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}", __extendedEncodeURIComponent(labelValue));
326
- } else {
327
- throw new Error("No value provided for input HTTP label: missionProfileId.");
328
- }
329
- let body: any;
330
- return new __HttpRequest({
331
- protocol,
332
- hostname,
333
- port,
334
- method: "DELETE",
335
- headers,
336
- path: resolvedPath,
337
- body,
338
- });
339
- };
340
-
341
- export const serializeAws_restJson1DescribeContactCommand = async (
342
- input: DescribeContactCommandInput,
343
- context: __SerdeContext
344
- ): Promise<__HttpRequest> => {
345
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
346
- const headers: any = {};
347
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/{contactId}";
348
- if (input.contactId !== undefined) {
349
- const labelValue: string = input.contactId;
350
- if (labelValue.length <= 0) {
351
- throw new Error("Empty value provided for input HTTP label: contactId.");
352
- }
353
- resolvedPath = resolvedPath.replace("{contactId}", __extendedEncodeURIComponent(labelValue));
354
- } else {
355
- throw new Error("No value provided for input HTTP label: contactId.");
356
- }
357
- let body: any;
358
- return new __HttpRequest({
359
- protocol,
360
- hostname,
361
- port,
362
- method: "GET",
363
- headers,
364
- path: resolvedPath,
365
- body,
366
- });
367
- };
368
-
369
- export const serializeAws_restJson1GetConfigCommand = async (
370
- input: GetConfigCommandInput,
371
- context: __SerdeContext
372
- ): Promise<__HttpRequest> => {
373
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
374
- const headers: any = {};
375
- let resolvedPath =
376
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/config/{configType}/{configId}";
377
- if (input.configId !== undefined) {
378
- const labelValue: string = input.configId;
379
- if (labelValue.length <= 0) {
380
- throw new Error("Empty value provided for input HTTP label: configId.");
381
- }
382
- resolvedPath = resolvedPath.replace("{configId}", __extendedEncodeURIComponent(labelValue));
383
- } else {
384
- throw new Error("No value provided for input HTTP label: configId.");
385
- }
386
- if (input.configType !== undefined) {
387
- const labelValue: string = input.configType;
388
- if (labelValue.length <= 0) {
389
- throw new Error("Empty value provided for input HTTP label: configType.");
390
- }
391
- resolvedPath = resolvedPath.replace("{configType}", __extendedEncodeURIComponent(labelValue));
392
- } else {
393
- throw new Error("No value provided for input HTTP label: configType.");
394
- }
395
- let body: any;
396
- return new __HttpRequest({
397
- protocol,
398
- hostname,
399
- port,
400
- method: "GET",
401
- headers,
402
- path: resolvedPath,
403
- body,
404
- });
405
- };
406
-
407
- export const serializeAws_restJson1GetDataflowEndpointGroupCommand = async (
408
- input: GetDataflowEndpointGroupCommandInput,
409
- context: __SerdeContext
410
- ): Promise<__HttpRequest> => {
411
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
412
- const headers: any = {};
413
- let resolvedPath =
414
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
415
- "/dataflowEndpointGroup/{dataflowEndpointGroupId}";
416
- if (input.dataflowEndpointGroupId !== undefined) {
417
- const labelValue: string = input.dataflowEndpointGroupId;
418
- if (labelValue.length <= 0) {
419
- throw new Error("Empty value provided for input HTTP label: dataflowEndpointGroupId.");
420
- }
421
- resolvedPath = resolvedPath.replace("{dataflowEndpointGroupId}", __extendedEncodeURIComponent(labelValue));
422
- } else {
423
- throw new Error("No value provided for input HTTP label: dataflowEndpointGroupId.");
424
- }
425
- let body: any;
426
- return new __HttpRequest({
427
- protocol,
428
- hostname,
429
- port,
430
- method: "GET",
431
- headers,
432
- path: resolvedPath,
433
- body,
434
- });
435
- };
436
-
437
- export const serializeAws_restJson1GetMinuteUsageCommand = async (
438
- input: GetMinuteUsageCommandInput,
439
- context: __SerdeContext
440
- ): Promise<__HttpRequest> => {
441
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
442
- const headers: any = {
443
- "content-type": "application/json",
444
- };
445
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/minute-usage";
446
- let body: any;
447
- body = JSON.stringify({
448
- ...(input.month !== undefined && input.month !== null && { month: input.month }),
449
- ...(input.year !== undefined && input.year !== null && { year: input.year }),
450
- });
451
- return new __HttpRequest({
452
- protocol,
453
- hostname,
454
- port,
455
- method: "POST",
456
- headers,
457
- path: resolvedPath,
458
- body,
459
- });
460
- };
461
-
462
- export const serializeAws_restJson1GetMissionProfileCommand = async (
463
- input: GetMissionProfileCommandInput,
464
- context: __SerdeContext
465
- ): Promise<__HttpRequest> => {
466
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
467
- const headers: any = {};
468
- let resolvedPath =
469
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile/{missionProfileId}";
470
- if (input.missionProfileId !== undefined) {
471
- const labelValue: string = input.missionProfileId;
472
- if (labelValue.length <= 0) {
473
- throw new Error("Empty value provided for input HTTP label: missionProfileId.");
474
- }
475
- resolvedPath = resolvedPath.replace("{missionProfileId}", __extendedEncodeURIComponent(labelValue));
476
- } else {
477
- throw new Error("No value provided for input HTTP label: missionProfileId.");
478
- }
479
- let body: any;
480
- return new __HttpRequest({
481
- protocol,
482
- hostname,
483
- port,
484
- method: "GET",
485
- headers,
486
- path: resolvedPath,
487
- body,
488
- });
489
- };
490
-
491
- export const serializeAws_restJson1GetSatelliteCommand = async (
492
- input: GetSatelliteCommandInput,
493
- context: __SerdeContext
494
- ): Promise<__HttpRequest> => {
495
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
496
- const headers: any = {};
497
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/satellite/{satelliteId}";
498
- if (input.satelliteId !== undefined) {
499
- const labelValue: string = input.satelliteId;
500
- if (labelValue.length <= 0) {
501
- throw new Error("Empty value provided for input HTTP label: satelliteId.");
502
- }
503
- resolvedPath = resolvedPath.replace("{satelliteId}", __extendedEncodeURIComponent(labelValue));
504
- } else {
505
- throw new Error("No value provided for input HTTP label: satelliteId.");
506
- }
507
- let body: any;
508
- return new __HttpRequest({
509
- protocol,
510
- hostname,
511
- port,
512
- method: "GET",
513
- headers,
514
- path: resolvedPath,
515
- body,
516
- });
517
- };
518
-
519
- export const serializeAws_restJson1ListConfigsCommand = async (
520
- input: ListConfigsCommandInput,
521
- context: __SerdeContext
522
- ): Promise<__HttpRequest> => {
523
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
524
- const headers: any = {};
525
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/config";
526
- const query: any = {
527
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
528
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
529
- };
530
- let body: any;
531
- return new __HttpRequest({
532
- protocol,
533
- hostname,
534
- port,
535
- method: "GET",
536
- headers,
537
- path: resolvedPath,
538
- query,
539
- body,
540
- });
541
- };
542
-
543
- export const serializeAws_restJson1ListContactsCommand = async (
544
- input: ListContactsCommandInput,
545
- context: __SerdeContext
546
- ): Promise<__HttpRequest> => {
547
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
548
- const headers: any = {
549
- "content-type": "application/json",
550
- };
551
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contacts";
552
- let body: any;
553
- body = JSON.stringify({
554
- ...(input.endTime !== undefined &&
555
- input.endTime !== null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
556
- ...(input.groundStation !== undefined && input.groundStation !== null && { groundStation: input.groundStation }),
557
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
558
- ...(input.missionProfileArn !== undefined &&
559
- input.missionProfileArn !== null && { missionProfileArn: input.missionProfileArn }),
560
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
561
- ...(input.satelliteArn !== undefined && input.satelliteArn !== null && { satelliteArn: input.satelliteArn }),
562
- ...(input.startTime !== undefined &&
563
- input.startTime !== null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
564
- ...(input.statusList !== undefined &&
565
- input.statusList !== null && { statusList: serializeAws_restJson1StatusList(input.statusList, context) }),
566
- });
567
- return new __HttpRequest({
568
- protocol,
569
- hostname,
570
- port,
571
- method: "POST",
572
- headers,
573
- path: resolvedPath,
574
- body,
575
- });
576
- };
577
-
578
- export const serializeAws_restJson1ListDataflowEndpointGroupsCommand = async (
579
- input: ListDataflowEndpointGroupsCommandInput,
580
- context: __SerdeContext
581
- ): Promise<__HttpRequest> => {
582
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
583
- const headers: any = {};
584
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataflowEndpointGroup";
585
- const query: any = {
586
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
587
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
588
- };
589
- let body: any;
590
- return new __HttpRequest({
591
- protocol,
592
- hostname,
593
- port,
594
- method: "GET",
595
- headers,
596
- path: resolvedPath,
597
- query,
598
- body,
599
- });
600
- };
601
-
602
- export const serializeAws_restJson1ListGroundStationsCommand = async (
603
- input: ListGroundStationsCommandInput,
604
- context: __SerdeContext
605
- ): Promise<__HttpRequest> => {
606
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
607
- const headers: any = {};
608
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groundstation";
609
- const query: any = {
610
- ...(input.satelliteId !== undefined && { satelliteId: input.satelliteId }),
611
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
612
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
613
- };
614
- let body: any;
615
- return new __HttpRequest({
616
- protocol,
617
- hostname,
618
- port,
619
- method: "GET",
620
- headers,
621
- path: resolvedPath,
622
- query,
623
- body,
624
- });
625
- };
626
-
627
- export const serializeAws_restJson1ListMissionProfilesCommand = async (
628
- input: ListMissionProfilesCommandInput,
629
- context: __SerdeContext
630
- ): Promise<__HttpRequest> => {
631
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
632
- const headers: any = {};
633
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile";
634
- const query: any = {
635
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
636
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
637
- };
638
- let body: any;
639
- return new __HttpRequest({
640
- protocol,
641
- hostname,
642
- port,
643
- method: "GET",
644
- headers,
645
- path: resolvedPath,
646
- query,
647
- body,
648
- });
649
- };
650
-
651
- export const serializeAws_restJson1ListSatellitesCommand = async (
652
- input: ListSatellitesCommandInput,
653
- context: __SerdeContext
654
- ): Promise<__HttpRequest> => {
655
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
656
- const headers: any = {};
657
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/satellite";
658
- const query: any = {
659
- ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
660
- ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
661
- };
662
- let body: any;
663
- return new __HttpRequest({
664
- protocol,
665
- hostname,
666
- port,
667
- method: "GET",
668
- headers,
669
- path: resolvedPath,
670
- query,
671
- body,
672
- });
673
- };
674
-
675
- export const serializeAws_restJson1ListTagsForResourceCommand = async (
676
- input: ListTagsForResourceCommandInput,
677
- context: __SerdeContext
678
- ): Promise<__HttpRequest> => {
679
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
680
- const headers: any = {};
681
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
682
- if (input.resourceArn !== undefined) {
683
- const labelValue: string = input.resourceArn;
684
- if (labelValue.length <= 0) {
685
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
686
- }
687
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
688
- } else {
689
- throw new Error("No value provided for input HTTP label: resourceArn.");
690
- }
691
- let body: any;
692
- return new __HttpRequest({
693
- protocol,
694
- hostname,
695
- port,
696
- method: "GET",
697
- headers,
698
- path: resolvedPath,
699
- body,
700
- });
701
- };
702
-
703
- export const serializeAws_restJson1ReserveContactCommand = async (
704
- input: ReserveContactCommandInput,
705
- context: __SerdeContext
706
- ): Promise<__HttpRequest> => {
707
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
708
- const headers: any = {
709
- "content-type": "application/json",
710
- };
711
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact";
712
- let body: any;
713
- body = JSON.stringify({
714
- ...(input.endTime !== undefined &&
715
- input.endTime !== null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
716
- ...(input.groundStation !== undefined && input.groundStation !== null && { groundStation: input.groundStation }),
717
- ...(input.missionProfileArn !== undefined &&
718
- input.missionProfileArn !== null && { missionProfileArn: input.missionProfileArn }),
719
- ...(input.satelliteArn !== undefined && input.satelliteArn !== null && { satelliteArn: input.satelliteArn }),
720
- ...(input.startTime !== undefined &&
721
- input.startTime !== null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
722
- ...(input.tags !== undefined &&
723
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
724
- });
725
- return new __HttpRequest({
726
- protocol,
727
- hostname,
728
- port,
729
- method: "POST",
730
- headers,
731
- path: resolvedPath,
732
- body,
733
- });
734
- };
735
-
736
- export const serializeAws_restJson1TagResourceCommand = async (
737
- input: TagResourceCommandInput,
738
- context: __SerdeContext
739
- ): Promise<__HttpRequest> => {
740
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
741
- const headers: any = {
742
- "content-type": "application/json",
743
- };
744
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
745
- if (input.resourceArn !== undefined) {
746
- const labelValue: string = input.resourceArn;
747
- if (labelValue.length <= 0) {
748
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
749
- }
750
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
751
- } else {
752
- throw new Error("No value provided for input HTTP label: resourceArn.");
753
- }
754
- let body: any;
755
- body = JSON.stringify({
756
- ...(input.tags !== undefined &&
757
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
758
- });
759
- return new __HttpRequest({
760
- protocol,
761
- hostname,
762
- port,
763
- method: "POST",
764
- headers,
765
- path: resolvedPath,
766
- body,
767
- });
768
- };
769
-
770
- export const serializeAws_restJson1UntagResourceCommand = async (
771
- input: UntagResourceCommandInput,
772
- context: __SerdeContext
773
- ): Promise<__HttpRequest> => {
774
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
775
- const headers: any = {};
776
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
777
- if (input.resourceArn !== undefined) {
778
- const labelValue: string = input.resourceArn;
779
- if (labelValue.length <= 0) {
780
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
781
- }
782
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
783
- } else {
784
- throw new Error("No value provided for input HTTP label: resourceArn.");
785
- }
786
- const query: any = {
787
- ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }),
788
- };
789
- let body: any;
790
- return new __HttpRequest({
791
- protocol,
792
- hostname,
793
- port,
794
- method: "DELETE",
795
- headers,
796
- path: resolvedPath,
797
- query,
798
- body,
799
- });
800
- };
801
-
802
- export const serializeAws_restJson1UpdateConfigCommand = async (
803
- input: UpdateConfigCommandInput,
804
- context: __SerdeContext
805
- ): Promise<__HttpRequest> => {
806
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
807
- const headers: any = {
808
- "content-type": "application/json",
809
- };
810
- let resolvedPath =
811
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/config/{configType}/{configId}";
812
- if (input.configId !== undefined) {
813
- const labelValue: string = input.configId;
814
- if (labelValue.length <= 0) {
815
- throw new Error("Empty value provided for input HTTP label: configId.");
816
- }
817
- resolvedPath = resolvedPath.replace("{configId}", __extendedEncodeURIComponent(labelValue));
818
- } else {
819
- throw new Error("No value provided for input HTTP label: configId.");
820
- }
821
- if (input.configType !== undefined) {
822
- const labelValue: string = input.configType;
823
- if (labelValue.length <= 0) {
824
- throw new Error("Empty value provided for input HTTP label: configType.");
825
- }
826
- resolvedPath = resolvedPath.replace("{configType}", __extendedEncodeURIComponent(labelValue));
827
- } else {
828
- throw new Error("No value provided for input HTTP label: configType.");
829
- }
830
- let body: any;
831
- body = JSON.stringify({
832
- ...(input.configData !== undefined &&
833
- input.configData !== null && { configData: serializeAws_restJson1ConfigTypeData(input.configData, context) }),
834
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
835
- });
836
- return new __HttpRequest({
837
- protocol,
838
- hostname,
839
- port,
840
- method: "PUT",
841
- headers,
842
- path: resolvedPath,
843
- body,
844
- });
845
- };
846
-
847
- export const serializeAws_restJson1UpdateMissionProfileCommand = async (
848
- input: UpdateMissionProfileCommandInput,
849
- context: __SerdeContext
850
- ): Promise<__HttpRequest> => {
851
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
852
- const headers: any = {
853
- "content-type": "application/json",
854
- };
855
- let resolvedPath =
856
- `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile/{missionProfileId}";
857
- if (input.missionProfileId !== undefined) {
858
- const labelValue: string = input.missionProfileId;
859
- if (labelValue.length <= 0) {
860
- throw new Error("Empty value provided for input HTTP label: missionProfileId.");
861
- }
862
- resolvedPath = resolvedPath.replace("{missionProfileId}", __extendedEncodeURIComponent(labelValue));
863
- } else {
864
- throw new Error("No value provided for input HTTP label: missionProfileId.");
865
- }
866
- let body: any;
867
- body = JSON.stringify({
868
- ...(input.contactPostPassDurationSeconds !== undefined &&
869
- input.contactPostPassDurationSeconds !== null && {
870
- contactPostPassDurationSeconds: input.contactPostPassDurationSeconds,
871
- }),
872
- ...(input.contactPrePassDurationSeconds !== undefined &&
873
- input.contactPrePassDurationSeconds !== null && {
874
- contactPrePassDurationSeconds: input.contactPrePassDurationSeconds,
875
- }),
876
- ...(input.dataflowEdges !== undefined &&
877
- input.dataflowEdges !== null && {
878
- dataflowEdges: serializeAws_restJson1DataflowEdgeList(input.dataflowEdges, context),
879
- }),
880
- ...(input.minimumViableContactDurationSeconds !== undefined &&
881
- input.minimumViableContactDurationSeconds !== null && {
882
- minimumViableContactDurationSeconds: input.minimumViableContactDurationSeconds,
883
- }),
884
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
885
- ...(input.trackingConfigArn !== undefined &&
886
- input.trackingConfigArn !== null && { trackingConfigArn: input.trackingConfigArn }),
887
- });
888
- return new __HttpRequest({
889
- protocol,
890
- hostname,
891
- port,
892
- method: "PUT",
893
- headers,
894
- path: resolvedPath,
895
- body,
896
- });
897
- };
898
-
899
- export const deserializeAws_restJson1CancelContactCommand = async (
900
- output: __HttpResponse,
901
- context: __SerdeContext
902
- ): Promise<CancelContactCommandOutput> => {
903
- if (output.statusCode !== 200 && output.statusCode >= 300) {
904
- return deserializeAws_restJson1CancelContactCommandError(output, context);
905
- }
906
- const contents: CancelContactCommandOutput = {
907
- $metadata: deserializeMetadata(output),
908
- contactId: undefined,
909
- };
910
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
911
- if (data.contactId !== undefined && data.contactId !== null) {
912
- contents.contactId = __expectString(data.contactId);
913
- }
914
- return Promise.resolve(contents);
915
- };
916
-
917
- const deserializeAws_restJson1CancelContactCommandError = async (
918
- output: __HttpResponse,
919
- context: __SerdeContext
920
- ): Promise<CancelContactCommandOutput> => {
921
- const parsedOutput: any = {
922
- ...output,
923
- body: await parseBody(output.body, context),
924
- };
925
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
926
- let errorCode = "UnknownError";
927
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
928
- switch (errorCode) {
929
- case "DependencyException":
930
- case "com.amazonaws.groundstation#DependencyException":
931
- response = {
932
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
933
- name: errorCode,
934
- $metadata: deserializeMetadata(output),
935
- };
936
- break;
937
- case "InvalidParameterException":
938
- case "com.amazonaws.groundstation#InvalidParameterException":
939
- response = {
940
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
941
- name: errorCode,
942
- $metadata: deserializeMetadata(output),
943
- };
944
- break;
945
- case "ResourceNotFoundException":
946
- case "com.amazonaws.groundstation#ResourceNotFoundException":
947
- response = {
948
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
949
- name: errorCode,
950
- $metadata: deserializeMetadata(output),
951
- };
952
- break;
953
- default:
954
- const parsedBody = parsedOutput.body;
955
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
956
- response = {
957
- ...parsedBody,
958
- name: `${errorCode}`,
959
- message: parsedBody.message || parsedBody.Message || errorCode,
960
- $fault: "client",
961
- $metadata: deserializeMetadata(output),
962
- } as any;
963
- }
964
- const message = response.message || response.Message || errorCode;
965
- response.message = message;
966
- delete response.Message;
967
- return Promise.reject(Object.assign(new Error(message), response));
968
- };
969
-
970
- export const deserializeAws_restJson1CreateConfigCommand = async (
971
- output: __HttpResponse,
972
- context: __SerdeContext
973
- ): Promise<CreateConfigCommandOutput> => {
974
- if (output.statusCode !== 200 && output.statusCode >= 300) {
975
- return deserializeAws_restJson1CreateConfigCommandError(output, context);
976
- }
977
- const contents: CreateConfigCommandOutput = {
978
- $metadata: deserializeMetadata(output),
979
- configArn: undefined,
980
- configId: undefined,
981
- configType: undefined,
982
- };
983
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
984
- if (data.configArn !== undefined && data.configArn !== null) {
985
- contents.configArn = __expectString(data.configArn);
986
- }
987
- if (data.configId !== undefined && data.configId !== null) {
988
- contents.configId = __expectString(data.configId);
989
- }
990
- if (data.configType !== undefined && data.configType !== null) {
991
- contents.configType = __expectString(data.configType);
992
- }
993
- return Promise.resolve(contents);
994
- };
995
-
996
- const deserializeAws_restJson1CreateConfigCommandError = async (
997
- output: __HttpResponse,
998
- context: __SerdeContext
999
- ): Promise<CreateConfigCommandOutput> => {
1000
- const parsedOutput: any = {
1001
- ...output,
1002
- body: await parseBody(output.body, context),
1003
- };
1004
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1005
- let errorCode = "UnknownError";
1006
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1007
- switch (errorCode) {
1008
- case "DependencyException":
1009
- case "com.amazonaws.groundstation#DependencyException":
1010
- response = {
1011
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1012
- name: errorCode,
1013
- $metadata: deserializeMetadata(output),
1014
- };
1015
- break;
1016
- case "InvalidParameterException":
1017
- case "com.amazonaws.groundstation#InvalidParameterException":
1018
- response = {
1019
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1020
- name: errorCode,
1021
- $metadata: deserializeMetadata(output),
1022
- };
1023
- break;
1024
- case "ResourceLimitExceededException":
1025
- case "com.amazonaws.groundstation#ResourceLimitExceededException":
1026
- response = {
1027
- ...(await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)),
1028
- name: errorCode,
1029
- $metadata: deserializeMetadata(output),
1030
- };
1031
- break;
1032
- case "ResourceNotFoundException":
1033
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1034
- response = {
1035
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1036
- name: errorCode,
1037
- $metadata: deserializeMetadata(output),
1038
- };
1039
- break;
1040
- default:
1041
- const parsedBody = parsedOutput.body;
1042
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1043
- response = {
1044
- ...parsedBody,
1045
- name: `${errorCode}`,
1046
- message: parsedBody.message || parsedBody.Message || errorCode,
1047
- $fault: "client",
1048
- $metadata: deserializeMetadata(output),
1049
- } as any;
1050
- }
1051
- const message = response.message || response.Message || errorCode;
1052
- response.message = message;
1053
- delete response.Message;
1054
- return Promise.reject(Object.assign(new Error(message), response));
1055
- };
1056
-
1057
- export const deserializeAws_restJson1CreateDataflowEndpointGroupCommand = async (
1058
- output: __HttpResponse,
1059
- context: __SerdeContext
1060
- ): Promise<CreateDataflowEndpointGroupCommandOutput> => {
1061
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1062
- return deserializeAws_restJson1CreateDataflowEndpointGroupCommandError(output, context);
1063
- }
1064
- const contents: CreateDataflowEndpointGroupCommandOutput = {
1065
- $metadata: deserializeMetadata(output),
1066
- dataflowEndpointGroupId: undefined,
1067
- };
1068
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1069
- if (data.dataflowEndpointGroupId !== undefined && data.dataflowEndpointGroupId !== null) {
1070
- contents.dataflowEndpointGroupId = __expectString(data.dataflowEndpointGroupId);
1071
- }
1072
- return Promise.resolve(contents);
1073
- };
1074
-
1075
- const deserializeAws_restJson1CreateDataflowEndpointGroupCommandError = async (
1076
- output: __HttpResponse,
1077
- context: __SerdeContext
1078
- ): Promise<CreateDataflowEndpointGroupCommandOutput> => {
1079
- const parsedOutput: any = {
1080
- ...output,
1081
- body: await parseBody(output.body, context),
1082
- };
1083
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1084
- let errorCode = "UnknownError";
1085
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1086
- switch (errorCode) {
1087
- case "DependencyException":
1088
- case "com.amazonaws.groundstation#DependencyException":
1089
- response = {
1090
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1091
- name: errorCode,
1092
- $metadata: deserializeMetadata(output),
1093
- };
1094
- break;
1095
- case "InvalidParameterException":
1096
- case "com.amazonaws.groundstation#InvalidParameterException":
1097
- response = {
1098
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1099
- name: errorCode,
1100
- $metadata: deserializeMetadata(output),
1101
- };
1102
- break;
1103
- case "ResourceNotFoundException":
1104
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1105
- response = {
1106
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1107
- name: errorCode,
1108
- $metadata: deserializeMetadata(output),
1109
- };
1110
- break;
1111
- default:
1112
- const parsedBody = parsedOutput.body;
1113
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1114
- response = {
1115
- ...parsedBody,
1116
- name: `${errorCode}`,
1117
- message: parsedBody.message || parsedBody.Message || errorCode,
1118
- $fault: "client",
1119
- $metadata: deserializeMetadata(output),
1120
- } as any;
1121
- }
1122
- const message = response.message || response.Message || errorCode;
1123
- response.message = message;
1124
- delete response.Message;
1125
- return Promise.reject(Object.assign(new Error(message), response));
1126
- };
1127
-
1128
- export const deserializeAws_restJson1CreateMissionProfileCommand = async (
1129
- output: __HttpResponse,
1130
- context: __SerdeContext
1131
- ): Promise<CreateMissionProfileCommandOutput> => {
1132
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1133
- return deserializeAws_restJson1CreateMissionProfileCommandError(output, context);
1134
- }
1135
- const contents: CreateMissionProfileCommandOutput = {
1136
- $metadata: deserializeMetadata(output),
1137
- missionProfileId: undefined,
1138
- };
1139
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1140
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
1141
- contents.missionProfileId = __expectString(data.missionProfileId);
1142
- }
1143
- return Promise.resolve(contents);
1144
- };
1145
-
1146
- const deserializeAws_restJson1CreateMissionProfileCommandError = async (
1147
- output: __HttpResponse,
1148
- context: __SerdeContext
1149
- ): Promise<CreateMissionProfileCommandOutput> => {
1150
- const parsedOutput: any = {
1151
- ...output,
1152
- body: await parseBody(output.body, context),
1153
- };
1154
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1155
- let errorCode = "UnknownError";
1156
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1157
- switch (errorCode) {
1158
- case "DependencyException":
1159
- case "com.amazonaws.groundstation#DependencyException":
1160
- response = {
1161
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1162
- name: errorCode,
1163
- $metadata: deserializeMetadata(output),
1164
- };
1165
- break;
1166
- case "InvalidParameterException":
1167
- case "com.amazonaws.groundstation#InvalidParameterException":
1168
- response = {
1169
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1170
- name: errorCode,
1171
- $metadata: deserializeMetadata(output),
1172
- };
1173
- break;
1174
- case "ResourceNotFoundException":
1175
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1176
- response = {
1177
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1178
- name: errorCode,
1179
- $metadata: deserializeMetadata(output),
1180
- };
1181
- break;
1182
- default:
1183
- const parsedBody = parsedOutput.body;
1184
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1185
- response = {
1186
- ...parsedBody,
1187
- name: `${errorCode}`,
1188
- message: parsedBody.message || parsedBody.Message || errorCode,
1189
- $fault: "client",
1190
- $metadata: deserializeMetadata(output),
1191
- } as any;
1192
- }
1193
- const message = response.message || response.Message || errorCode;
1194
- response.message = message;
1195
- delete response.Message;
1196
- return Promise.reject(Object.assign(new Error(message), response));
1197
- };
1198
-
1199
- export const deserializeAws_restJson1DeleteConfigCommand = async (
1200
- output: __HttpResponse,
1201
- context: __SerdeContext
1202
- ): Promise<DeleteConfigCommandOutput> => {
1203
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1204
- return deserializeAws_restJson1DeleteConfigCommandError(output, context);
1205
- }
1206
- const contents: DeleteConfigCommandOutput = {
1207
- $metadata: deserializeMetadata(output),
1208
- configArn: undefined,
1209
- configId: undefined,
1210
- configType: undefined,
1211
- };
1212
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1213
- if (data.configArn !== undefined && data.configArn !== null) {
1214
- contents.configArn = __expectString(data.configArn);
1215
- }
1216
- if (data.configId !== undefined && data.configId !== null) {
1217
- contents.configId = __expectString(data.configId);
1218
- }
1219
- if (data.configType !== undefined && data.configType !== null) {
1220
- contents.configType = __expectString(data.configType);
1221
- }
1222
- return Promise.resolve(contents);
1223
- };
1224
-
1225
- const deserializeAws_restJson1DeleteConfigCommandError = async (
1226
- output: __HttpResponse,
1227
- context: __SerdeContext
1228
- ): Promise<DeleteConfigCommandOutput> => {
1229
- const parsedOutput: any = {
1230
- ...output,
1231
- body: await parseBody(output.body, context),
1232
- };
1233
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1234
- let errorCode = "UnknownError";
1235
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1236
- switch (errorCode) {
1237
- case "DependencyException":
1238
- case "com.amazonaws.groundstation#DependencyException":
1239
- response = {
1240
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1241
- name: errorCode,
1242
- $metadata: deserializeMetadata(output),
1243
- };
1244
- break;
1245
- case "InvalidParameterException":
1246
- case "com.amazonaws.groundstation#InvalidParameterException":
1247
- response = {
1248
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1249
- name: errorCode,
1250
- $metadata: deserializeMetadata(output),
1251
- };
1252
- break;
1253
- case "ResourceNotFoundException":
1254
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1255
- response = {
1256
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1257
- name: errorCode,
1258
- $metadata: deserializeMetadata(output),
1259
- };
1260
- break;
1261
- default:
1262
- const parsedBody = parsedOutput.body;
1263
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1264
- response = {
1265
- ...parsedBody,
1266
- name: `${errorCode}`,
1267
- message: parsedBody.message || parsedBody.Message || errorCode,
1268
- $fault: "client",
1269
- $metadata: deserializeMetadata(output),
1270
- } as any;
1271
- }
1272
- const message = response.message || response.Message || errorCode;
1273
- response.message = message;
1274
- delete response.Message;
1275
- return Promise.reject(Object.assign(new Error(message), response));
1276
- };
1277
-
1278
- export const deserializeAws_restJson1DeleteDataflowEndpointGroupCommand = async (
1279
- output: __HttpResponse,
1280
- context: __SerdeContext
1281
- ): Promise<DeleteDataflowEndpointGroupCommandOutput> => {
1282
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1283
- return deserializeAws_restJson1DeleteDataflowEndpointGroupCommandError(output, context);
1284
- }
1285
- const contents: DeleteDataflowEndpointGroupCommandOutput = {
1286
- $metadata: deserializeMetadata(output),
1287
- dataflowEndpointGroupId: undefined,
1288
- };
1289
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1290
- if (data.dataflowEndpointGroupId !== undefined && data.dataflowEndpointGroupId !== null) {
1291
- contents.dataflowEndpointGroupId = __expectString(data.dataflowEndpointGroupId);
1292
- }
1293
- return Promise.resolve(contents);
1294
- };
1295
-
1296
- const deserializeAws_restJson1DeleteDataflowEndpointGroupCommandError = async (
1297
- output: __HttpResponse,
1298
- context: __SerdeContext
1299
- ): Promise<DeleteDataflowEndpointGroupCommandOutput> => {
1300
- const parsedOutput: any = {
1301
- ...output,
1302
- body: await parseBody(output.body, context),
1303
- };
1304
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1305
- let errorCode = "UnknownError";
1306
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1307
- switch (errorCode) {
1308
- case "DependencyException":
1309
- case "com.amazonaws.groundstation#DependencyException":
1310
- response = {
1311
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1312
- name: errorCode,
1313
- $metadata: deserializeMetadata(output),
1314
- };
1315
- break;
1316
- case "InvalidParameterException":
1317
- case "com.amazonaws.groundstation#InvalidParameterException":
1318
- response = {
1319
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1320
- name: errorCode,
1321
- $metadata: deserializeMetadata(output),
1322
- };
1323
- break;
1324
- case "ResourceNotFoundException":
1325
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1326
- response = {
1327
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1328
- name: errorCode,
1329
- $metadata: deserializeMetadata(output),
1330
- };
1331
- break;
1332
- default:
1333
- const parsedBody = parsedOutput.body;
1334
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1335
- response = {
1336
- ...parsedBody,
1337
- name: `${errorCode}`,
1338
- message: parsedBody.message || parsedBody.Message || errorCode,
1339
- $fault: "client",
1340
- $metadata: deserializeMetadata(output),
1341
- } as any;
1342
- }
1343
- const message = response.message || response.Message || errorCode;
1344
- response.message = message;
1345
- delete response.Message;
1346
- return Promise.reject(Object.assign(new Error(message), response));
1347
- };
1348
-
1349
- export const deserializeAws_restJson1DeleteMissionProfileCommand = async (
1350
- output: __HttpResponse,
1351
- context: __SerdeContext
1352
- ): Promise<DeleteMissionProfileCommandOutput> => {
1353
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1354
- return deserializeAws_restJson1DeleteMissionProfileCommandError(output, context);
1355
- }
1356
- const contents: DeleteMissionProfileCommandOutput = {
1357
- $metadata: deserializeMetadata(output),
1358
- missionProfileId: undefined,
1359
- };
1360
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1361
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
1362
- contents.missionProfileId = __expectString(data.missionProfileId);
1363
- }
1364
- return Promise.resolve(contents);
1365
- };
1366
-
1367
- const deserializeAws_restJson1DeleteMissionProfileCommandError = async (
1368
- output: __HttpResponse,
1369
- context: __SerdeContext
1370
- ): Promise<DeleteMissionProfileCommandOutput> => {
1371
- const parsedOutput: any = {
1372
- ...output,
1373
- body: await parseBody(output.body, context),
1374
- };
1375
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1376
- let errorCode = "UnknownError";
1377
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1378
- switch (errorCode) {
1379
- case "DependencyException":
1380
- case "com.amazonaws.groundstation#DependencyException":
1381
- response = {
1382
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1383
- name: errorCode,
1384
- $metadata: deserializeMetadata(output),
1385
- };
1386
- break;
1387
- case "InvalidParameterException":
1388
- case "com.amazonaws.groundstation#InvalidParameterException":
1389
- response = {
1390
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1391
- name: errorCode,
1392
- $metadata: deserializeMetadata(output),
1393
- };
1394
- break;
1395
- case "ResourceNotFoundException":
1396
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1397
- response = {
1398
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1399
- name: errorCode,
1400
- $metadata: deserializeMetadata(output),
1401
- };
1402
- break;
1403
- default:
1404
- const parsedBody = parsedOutput.body;
1405
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1406
- response = {
1407
- ...parsedBody,
1408
- name: `${errorCode}`,
1409
- message: parsedBody.message || parsedBody.Message || errorCode,
1410
- $fault: "client",
1411
- $metadata: deserializeMetadata(output),
1412
- } as any;
1413
- }
1414
- const message = response.message || response.Message || errorCode;
1415
- response.message = message;
1416
- delete response.Message;
1417
- return Promise.reject(Object.assign(new Error(message), response));
1418
- };
1419
-
1420
- export const deserializeAws_restJson1DescribeContactCommand = async (
1421
- output: __HttpResponse,
1422
- context: __SerdeContext
1423
- ): Promise<DescribeContactCommandOutput> => {
1424
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1425
- return deserializeAws_restJson1DescribeContactCommandError(output, context);
1426
- }
1427
- const contents: DescribeContactCommandOutput = {
1428
- $metadata: deserializeMetadata(output),
1429
- contactId: undefined,
1430
- contactStatus: undefined,
1431
- dataflowList: undefined,
1432
- endTime: undefined,
1433
- errorMessage: undefined,
1434
- groundStation: undefined,
1435
- maximumElevation: undefined,
1436
- missionProfileArn: undefined,
1437
- postPassEndTime: undefined,
1438
- prePassStartTime: undefined,
1439
- region: undefined,
1440
- satelliteArn: undefined,
1441
- startTime: undefined,
1442
- tags: undefined,
1443
- };
1444
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1445
- if (data.contactId !== undefined && data.contactId !== null) {
1446
- contents.contactId = __expectString(data.contactId);
1447
- }
1448
- if (data.contactStatus !== undefined && data.contactStatus !== null) {
1449
- contents.contactStatus = __expectString(data.contactStatus);
1450
- }
1451
- if (data.dataflowList !== undefined && data.dataflowList !== null) {
1452
- contents.dataflowList = deserializeAws_restJson1DataflowList(data.dataflowList, context);
1453
- }
1454
- if (data.endTime !== undefined && data.endTime !== null) {
1455
- contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1456
- }
1457
- if (data.errorMessage !== undefined && data.errorMessage !== null) {
1458
- contents.errorMessage = __expectString(data.errorMessage);
1459
- }
1460
- if (data.groundStation !== undefined && data.groundStation !== null) {
1461
- contents.groundStation = __expectString(data.groundStation);
1462
- }
1463
- if (data.maximumElevation !== undefined && data.maximumElevation !== null) {
1464
- contents.maximumElevation = deserializeAws_restJson1Elevation(data.maximumElevation, context);
1465
- }
1466
- if (data.missionProfileArn !== undefined && data.missionProfileArn !== null) {
1467
- contents.missionProfileArn = __expectString(data.missionProfileArn);
1468
- }
1469
- if (data.postPassEndTime !== undefined && data.postPassEndTime !== null) {
1470
- contents.postPassEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.postPassEndTime)));
1471
- }
1472
- if (data.prePassStartTime !== undefined && data.prePassStartTime !== null) {
1473
- contents.prePassStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.prePassStartTime)));
1474
- }
1475
- if (data.region !== undefined && data.region !== null) {
1476
- contents.region = __expectString(data.region);
1477
- }
1478
- if (data.satelliteArn !== undefined && data.satelliteArn !== null) {
1479
- contents.satelliteArn = __expectString(data.satelliteArn);
1480
- }
1481
- if (data.startTime !== undefined && data.startTime !== null) {
1482
- contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
1483
- }
1484
- if (data.tags !== undefined && data.tags !== null) {
1485
- contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1486
- }
1487
- return Promise.resolve(contents);
1488
- };
1489
-
1490
- const deserializeAws_restJson1DescribeContactCommandError = async (
1491
- output: __HttpResponse,
1492
- context: __SerdeContext
1493
- ): Promise<DescribeContactCommandOutput> => {
1494
- const parsedOutput: any = {
1495
- ...output,
1496
- body: await parseBody(output.body, context),
1497
- };
1498
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1499
- let errorCode = "UnknownError";
1500
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1501
- switch (errorCode) {
1502
- case "DependencyException":
1503
- case "com.amazonaws.groundstation#DependencyException":
1504
- response = {
1505
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1506
- name: errorCode,
1507
- $metadata: deserializeMetadata(output),
1508
- };
1509
- break;
1510
- case "InvalidParameterException":
1511
- case "com.amazonaws.groundstation#InvalidParameterException":
1512
- response = {
1513
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1514
- name: errorCode,
1515
- $metadata: deserializeMetadata(output),
1516
- };
1517
- break;
1518
- case "ResourceNotFoundException":
1519
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1520
- response = {
1521
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1522
- name: errorCode,
1523
- $metadata: deserializeMetadata(output),
1524
- };
1525
- break;
1526
- default:
1527
- const parsedBody = parsedOutput.body;
1528
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1529
- response = {
1530
- ...parsedBody,
1531
- name: `${errorCode}`,
1532
- message: parsedBody.message || parsedBody.Message || errorCode,
1533
- $fault: "client",
1534
- $metadata: deserializeMetadata(output),
1535
- } as any;
1536
- }
1537
- const message = response.message || response.Message || errorCode;
1538
- response.message = message;
1539
- delete response.Message;
1540
- return Promise.reject(Object.assign(new Error(message), response));
1541
- };
1542
-
1543
- export const deserializeAws_restJson1GetConfigCommand = async (
1544
- output: __HttpResponse,
1545
- context: __SerdeContext
1546
- ): Promise<GetConfigCommandOutput> => {
1547
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1548
- return deserializeAws_restJson1GetConfigCommandError(output, context);
1549
- }
1550
- const contents: GetConfigCommandOutput = {
1551
- $metadata: deserializeMetadata(output),
1552
- configArn: undefined,
1553
- configData: undefined,
1554
- configId: undefined,
1555
- configType: undefined,
1556
- name: undefined,
1557
- tags: undefined,
1558
- };
1559
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1560
- if (data.configArn !== undefined && data.configArn !== null) {
1561
- contents.configArn = __expectString(data.configArn);
1562
- }
1563
- if (data.configData !== undefined && data.configData !== null) {
1564
- contents.configData = deserializeAws_restJson1ConfigTypeData(__expectUnion(data.configData), context);
1565
- }
1566
- if (data.configId !== undefined && data.configId !== null) {
1567
- contents.configId = __expectString(data.configId);
1568
- }
1569
- if (data.configType !== undefined && data.configType !== null) {
1570
- contents.configType = __expectString(data.configType);
1571
- }
1572
- if (data.name !== undefined && data.name !== null) {
1573
- contents.name = __expectString(data.name);
1574
- }
1575
- if (data.tags !== undefined && data.tags !== null) {
1576
- contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1577
- }
1578
- return Promise.resolve(contents);
1579
- };
1580
-
1581
- const deserializeAws_restJson1GetConfigCommandError = async (
1582
- output: __HttpResponse,
1583
- context: __SerdeContext
1584
- ): Promise<GetConfigCommandOutput> => {
1585
- const parsedOutput: any = {
1586
- ...output,
1587
- body: await parseBody(output.body, context),
1588
- };
1589
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1590
- let errorCode = "UnknownError";
1591
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1592
- switch (errorCode) {
1593
- case "DependencyException":
1594
- case "com.amazonaws.groundstation#DependencyException":
1595
- response = {
1596
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1597
- name: errorCode,
1598
- $metadata: deserializeMetadata(output),
1599
- };
1600
- break;
1601
- case "InvalidParameterException":
1602
- case "com.amazonaws.groundstation#InvalidParameterException":
1603
- response = {
1604
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1605
- name: errorCode,
1606
- $metadata: deserializeMetadata(output),
1607
- };
1608
- break;
1609
- case "ResourceNotFoundException":
1610
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1611
- response = {
1612
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1613
- name: errorCode,
1614
- $metadata: deserializeMetadata(output),
1615
- };
1616
- break;
1617
- default:
1618
- const parsedBody = parsedOutput.body;
1619
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1620
- response = {
1621
- ...parsedBody,
1622
- name: `${errorCode}`,
1623
- message: parsedBody.message || parsedBody.Message || errorCode,
1624
- $fault: "client",
1625
- $metadata: deserializeMetadata(output),
1626
- } as any;
1627
- }
1628
- const message = response.message || response.Message || errorCode;
1629
- response.message = message;
1630
- delete response.Message;
1631
- return Promise.reject(Object.assign(new Error(message), response));
1632
- };
1633
-
1634
- export const deserializeAws_restJson1GetDataflowEndpointGroupCommand = async (
1635
- output: __HttpResponse,
1636
- context: __SerdeContext
1637
- ): Promise<GetDataflowEndpointGroupCommandOutput> => {
1638
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1639
- return deserializeAws_restJson1GetDataflowEndpointGroupCommandError(output, context);
1640
- }
1641
- const contents: GetDataflowEndpointGroupCommandOutput = {
1642
- $metadata: deserializeMetadata(output),
1643
- dataflowEndpointGroupArn: undefined,
1644
- dataflowEndpointGroupId: undefined,
1645
- endpointsDetails: undefined,
1646
- tags: undefined,
1647
- };
1648
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1649
- if (data.dataflowEndpointGroupArn !== undefined && data.dataflowEndpointGroupArn !== null) {
1650
- contents.dataflowEndpointGroupArn = __expectString(data.dataflowEndpointGroupArn);
1651
- }
1652
- if (data.dataflowEndpointGroupId !== undefined && data.dataflowEndpointGroupId !== null) {
1653
- contents.dataflowEndpointGroupId = __expectString(data.dataflowEndpointGroupId);
1654
- }
1655
- if (data.endpointsDetails !== undefined && data.endpointsDetails !== null) {
1656
- contents.endpointsDetails = deserializeAws_restJson1EndpointDetailsList(data.endpointsDetails, context);
1657
- }
1658
- if (data.tags !== undefined && data.tags !== null) {
1659
- contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1660
- }
1661
- return Promise.resolve(contents);
1662
- };
1663
-
1664
- const deserializeAws_restJson1GetDataflowEndpointGroupCommandError = async (
1665
- output: __HttpResponse,
1666
- context: __SerdeContext
1667
- ): Promise<GetDataflowEndpointGroupCommandOutput> => {
1668
- const parsedOutput: any = {
1669
- ...output,
1670
- body: await parseBody(output.body, context),
1671
- };
1672
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1673
- let errorCode = "UnknownError";
1674
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1675
- switch (errorCode) {
1676
- case "DependencyException":
1677
- case "com.amazonaws.groundstation#DependencyException":
1678
- response = {
1679
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1680
- name: errorCode,
1681
- $metadata: deserializeMetadata(output),
1682
- };
1683
- break;
1684
- case "InvalidParameterException":
1685
- case "com.amazonaws.groundstation#InvalidParameterException":
1686
- response = {
1687
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1688
- name: errorCode,
1689
- $metadata: deserializeMetadata(output),
1690
- };
1691
- break;
1692
- case "ResourceNotFoundException":
1693
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1694
- response = {
1695
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1696
- name: errorCode,
1697
- $metadata: deserializeMetadata(output),
1698
- };
1699
- break;
1700
- default:
1701
- const parsedBody = parsedOutput.body;
1702
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1703
- response = {
1704
- ...parsedBody,
1705
- name: `${errorCode}`,
1706
- message: parsedBody.message || parsedBody.Message || errorCode,
1707
- $fault: "client",
1708
- $metadata: deserializeMetadata(output),
1709
- } as any;
1710
- }
1711
- const message = response.message || response.Message || errorCode;
1712
- response.message = message;
1713
- delete response.Message;
1714
- return Promise.reject(Object.assign(new Error(message), response));
1715
- };
1716
-
1717
- export const deserializeAws_restJson1GetMinuteUsageCommand = async (
1718
- output: __HttpResponse,
1719
- context: __SerdeContext
1720
- ): Promise<GetMinuteUsageCommandOutput> => {
1721
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1722
- return deserializeAws_restJson1GetMinuteUsageCommandError(output, context);
1723
- }
1724
- const contents: GetMinuteUsageCommandOutput = {
1725
- $metadata: deserializeMetadata(output),
1726
- estimatedMinutesRemaining: undefined,
1727
- isReservedMinutesCustomer: undefined,
1728
- totalReservedMinuteAllocation: undefined,
1729
- totalScheduledMinutes: undefined,
1730
- upcomingMinutesScheduled: undefined,
1731
- };
1732
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1733
- if (data.estimatedMinutesRemaining !== undefined && data.estimatedMinutesRemaining !== null) {
1734
- contents.estimatedMinutesRemaining = __expectInt32(data.estimatedMinutesRemaining);
1735
- }
1736
- if (data.isReservedMinutesCustomer !== undefined && data.isReservedMinutesCustomer !== null) {
1737
- contents.isReservedMinutesCustomer = __expectBoolean(data.isReservedMinutesCustomer);
1738
- }
1739
- if (data.totalReservedMinuteAllocation !== undefined && data.totalReservedMinuteAllocation !== null) {
1740
- contents.totalReservedMinuteAllocation = __expectInt32(data.totalReservedMinuteAllocation);
1741
- }
1742
- if (data.totalScheduledMinutes !== undefined && data.totalScheduledMinutes !== null) {
1743
- contents.totalScheduledMinutes = __expectInt32(data.totalScheduledMinutes);
1744
- }
1745
- if (data.upcomingMinutesScheduled !== undefined && data.upcomingMinutesScheduled !== null) {
1746
- contents.upcomingMinutesScheduled = __expectInt32(data.upcomingMinutesScheduled);
1747
- }
1748
- return Promise.resolve(contents);
1749
- };
1750
-
1751
- const deserializeAws_restJson1GetMinuteUsageCommandError = async (
1752
- output: __HttpResponse,
1753
- context: __SerdeContext
1754
- ): Promise<GetMinuteUsageCommandOutput> => {
1755
- const parsedOutput: any = {
1756
- ...output,
1757
- body: await parseBody(output.body, context),
1758
- };
1759
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1760
- let errorCode = "UnknownError";
1761
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1762
- switch (errorCode) {
1763
- case "DependencyException":
1764
- case "com.amazonaws.groundstation#DependencyException":
1765
- response = {
1766
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1767
- name: errorCode,
1768
- $metadata: deserializeMetadata(output),
1769
- };
1770
- break;
1771
- case "InvalidParameterException":
1772
- case "com.amazonaws.groundstation#InvalidParameterException":
1773
- response = {
1774
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1775
- name: errorCode,
1776
- $metadata: deserializeMetadata(output),
1777
- };
1778
- break;
1779
- case "ResourceNotFoundException":
1780
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1781
- response = {
1782
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1783
- name: errorCode,
1784
- $metadata: deserializeMetadata(output),
1785
- };
1786
- break;
1787
- default:
1788
- const parsedBody = parsedOutput.body;
1789
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1790
- response = {
1791
- ...parsedBody,
1792
- name: `${errorCode}`,
1793
- message: parsedBody.message || parsedBody.Message || errorCode,
1794
- $fault: "client",
1795
- $metadata: deserializeMetadata(output),
1796
- } as any;
1797
- }
1798
- const message = response.message || response.Message || errorCode;
1799
- response.message = message;
1800
- delete response.Message;
1801
- return Promise.reject(Object.assign(new Error(message), response));
1802
- };
1803
-
1804
- export const deserializeAws_restJson1GetMissionProfileCommand = async (
1805
- output: __HttpResponse,
1806
- context: __SerdeContext
1807
- ): Promise<GetMissionProfileCommandOutput> => {
1808
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1809
- return deserializeAws_restJson1GetMissionProfileCommandError(output, context);
1810
- }
1811
- const contents: GetMissionProfileCommandOutput = {
1812
- $metadata: deserializeMetadata(output),
1813
- contactPostPassDurationSeconds: undefined,
1814
- contactPrePassDurationSeconds: undefined,
1815
- dataflowEdges: undefined,
1816
- minimumViableContactDurationSeconds: undefined,
1817
- missionProfileArn: undefined,
1818
- missionProfileId: undefined,
1819
- name: undefined,
1820
- region: undefined,
1821
- tags: undefined,
1822
- trackingConfigArn: undefined,
1823
- };
1824
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1825
- if (data.contactPostPassDurationSeconds !== undefined && data.contactPostPassDurationSeconds !== null) {
1826
- contents.contactPostPassDurationSeconds = __expectInt32(data.contactPostPassDurationSeconds);
1827
- }
1828
- if (data.contactPrePassDurationSeconds !== undefined && data.contactPrePassDurationSeconds !== null) {
1829
- contents.contactPrePassDurationSeconds = __expectInt32(data.contactPrePassDurationSeconds);
1830
- }
1831
- if (data.dataflowEdges !== undefined && data.dataflowEdges !== null) {
1832
- contents.dataflowEdges = deserializeAws_restJson1DataflowEdgeList(data.dataflowEdges, context);
1833
- }
1834
- if (data.minimumViableContactDurationSeconds !== undefined && data.minimumViableContactDurationSeconds !== null) {
1835
- contents.minimumViableContactDurationSeconds = __expectInt32(data.minimumViableContactDurationSeconds);
1836
- }
1837
- if (data.missionProfileArn !== undefined && data.missionProfileArn !== null) {
1838
- contents.missionProfileArn = __expectString(data.missionProfileArn);
1839
- }
1840
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
1841
- contents.missionProfileId = __expectString(data.missionProfileId);
1842
- }
1843
- if (data.name !== undefined && data.name !== null) {
1844
- contents.name = __expectString(data.name);
1845
- }
1846
- if (data.region !== undefined && data.region !== null) {
1847
- contents.region = __expectString(data.region);
1848
- }
1849
- if (data.tags !== undefined && data.tags !== null) {
1850
- contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
1851
- }
1852
- if (data.trackingConfigArn !== undefined && data.trackingConfigArn !== null) {
1853
- contents.trackingConfigArn = __expectString(data.trackingConfigArn);
1854
- }
1855
- return Promise.resolve(contents);
1856
- };
1857
-
1858
- const deserializeAws_restJson1GetMissionProfileCommandError = async (
1859
- output: __HttpResponse,
1860
- context: __SerdeContext
1861
- ): Promise<GetMissionProfileCommandOutput> => {
1862
- const parsedOutput: any = {
1863
- ...output,
1864
- body: await parseBody(output.body, context),
1865
- };
1866
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1867
- let errorCode = "UnknownError";
1868
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1869
- switch (errorCode) {
1870
- case "DependencyException":
1871
- case "com.amazonaws.groundstation#DependencyException":
1872
- response = {
1873
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1874
- name: errorCode,
1875
- $metadata: deserializeMetadata(output),
1876
- };
1877
- break;
1878
- case "InvalidParameterException":
1879
- case "com.amazonaws.groundstation#InvalidParameterException":
1880
- response = {
1881
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1882
- name: errorCode,
1883
- $metadata: deserializeMetadata(output),
1884
- };
1885
- break;
1886
- case "ResourceNotFoundException":
1887
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1888
- response = {
1889
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1890
- name: errorCode,
1891
- $metadata: deserializeMetadata(output),
1892
- };
1893
- break;
1894
- default:
1895
- const parsedBody = parsedOutput.body;
1896
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1897
- response = {
1898
- ...parsedBody,
1899
- name: `${errorCode}`,
1900
- message: parsedBody.message || parsedBody.Message || errorCode,
1901
- $fault: "client",
1902
- $metadata: deserializeMetadata(output),
1903
- } as any;
1904
- }
1905
- const message = response.message || response.Message || errorCode;
1906
- response.message = message;
1907
- delete response.Message;
1908
- return Promise.reject(Object.assign(new Error(message), response));
1909
- };
1910
-
1911
- export const deserializeAws_restJson1GetSatelliteCommand = async (
1912
- output: __HttpResponse,
1913
- context: __SerdeContext
1914
- ): Promise<GetSatelliteCommandOutput> => {
1915
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1916
- return deserializeAws_restJson1GetSatelliteCommandError(output, context);
1917
- }
1918
- const contents: GetSatelliteCommandOutput = {
1919
- $metadata: deserializeMetadata(output),
1920
- groundStations: undefined,
1921
- noradSatelliteID: undefined,
1922
- satelliteArn: undefined,
1923
- satelliteId: undefined,
1924
- };
1925
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1926
- if (data.groundStations !== undefined && data.groundStations !== null) {
1927
- contents.groundStations = deserializeAws_restJson1GroundStationIdList(data.groundStations, context);
1928
- }
1929
- if (data.noradSatelliteID !== undefined && data.noradSatelliteID !== null) {
1930
- contents.noradSatelliteID = __expectInt32(data.noradSatelliteID);
1931
- }
1932
- if (data.satelliteArn !== undefined && data.satelliteArn !== null) {
1933
- contents.satelliteArn = __expectString(data.satelliteArn);
1934
- }
1935
- if (data.satelliteId !== undefined && data.satelliteId !== null) {
1936
- contents.satelliteId = __expectString(data.satelliteId);
1937
- }
1938
- return Promise.resolve(contents);
1939
- };
1940
-
1941
- const deserializeAws_restJson1GetSatelliteCommandError = async (
1942
- output: __HttpResponse,
1943
- context: __SerdeContext
1944
- ): Promise<GetSatelliteCommandOutput> => {
1945
- const parsedOutput: any = {
1946
- ...output,
1947
- body: await parseBody(output.body, context),
1948
- };
1949
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1950
- let errorCode = "UnknownError";
1951
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1952
- switch (errorCode) {
1953
- case "DependencyException":
1954
- case "com.amazonaws.groundstation#DependencyException":
1955
- response = {
1956
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
1957
- name: errorCode,
1958
- $metadata: deserializeMetadata(output),
1959
- };
1960
- break;
1961
- case "InvalidParameterException":
1962
- case "com.amazonaws.groundstation#InvalidParameterException":
1963
- response = {
1964
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
1965
- name: errorCode,
1966
- $metadata: deserializeMetadata(output),
1967
- };
1968
- break;
1969
- case "ResourceNotFoundException":
1970
- case "com.amazonaws.groundstation#ResourceNotFoundException":
1971
- response = {
1972
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1973
- name: errorCode,
1974
- $metadata: deserializeMetadata(output),
1975
- };
1976
- break;
1977
- default:
1978
- const parsedBody = parsedOutput.body;
1979
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1980
- response = {
1981
- ...parsedBody,
1982
- name: `${errorCode}`,
1983
- message: parsedBody.message || parsedBody.Message || errorCode,
1984
- $fault: "client",
1985
- $metadata: deserializeMetadata(output),
1986
- } as any;
1987
- }
1988
- const message = response.message || response.Message || errorCode;
1989
- response.message = message;
1990
- delete response.Message;
1991
- return Promise.reject(Object.assign(new Error(message), response));
1992
- };
1993
-
1994
- export const deserializeAws_restJson1ListConfigsCommand = async (
1995
- output: __HttpResponse,
1996
- context: __SerdeContext
1997
- ): Promise<ListConfigsCommandOutput> => {
1998
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1999
- return deserializeAws_restJson1ListConfigsCommandError(output, context);
2000
- }
2001
- const contents: ListConfigsCommandOutput = {
2002
- $metadata: deserializeMetadata(output),
2003
- configList: undefined,
2004
- nextToken: undefined,
2005
- };
2006
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2007
- if (data.configList !== undefined && data.configList !== null) {
2008
- contents.configList = deserializeAws_restJson1ConfigList(data.configList, context);
2009
- }
2010
- if (data.nextToken !== undefined && data.nextToken !== null) {
2011
- contents.nextToken = __expectString(data.nextToken);
2012
- }
2013
- return Promise.resolve(contents);
2014
- };
2015
-
2016
- const deserializeAws_restJson1ListConfigsCommandError = async (
2017
- output: __HttpResponse,
2018
- context: __SerdeContext
2019
- ): Promise<ListConfigsCommandOutput> => {
2020
- const parsedOutput: any = {
2021
- ...output,
2022
- body: await parseBody(output.body, context),
2023
- };
2024
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2025
- let errorCode = "UnknownError";
2026
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2027
- switch (errorCode) {
2028
- case "DependencyException":
2029
- case "com.amazonaws.groundstation#DependencyException":
2030
- response = {
2031
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2032
- name: errorCode,
2033
- $metadata: deserializeMetadata(output),
2034
- };
2035
- break;
2036
- case "InvalidParameterException":
2037
- case "com.amazonaws.groundstation#InvalidParameterException":
2038
- response = {
2039
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2040
- name: errorCode,
2041
- $metadata: deserializeMetadata(output),
2042
- };
2043
- break;
2044
- case "ResourceNotFoundException":
2045
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2046
- response = {
2047
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2048
- name: errorCode,
2049
- $metadata: deserializeMetadata(output),
2050
- };
2051
- break;
2052
- default:
2053
- const parsedBody = parsedOutput.body;
2054
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2055
- response = {
2056
- ...parsedBody,
2057
- name: `${errorCode}`,
2058
- message: parsedBody.message || parsedBody.Message || errorCode,
2059
- $fault: "client",
2060
- $metadata: deserializeMetadata(output),
2061
- } as any;
2062
- }
2063
- const message = response.message || response.Message || errorCode;
2064
- response.message = message;
2065
- delete response.Message;
2066
- return Promise.reject(Object.assign(new Error(message), response));
2067
- };
2068
-
2069
- export const deserializeAws_restJson1ListContactsCommand = async (
2070
- output: __HttpResponse,
2071
- context: __SerdeContext
2072
- ): Promise<ListContactsCommandOutput> => {
2073
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2074
- return deserializeAws_restJson1ListContactsCommandError(output, context);
2075
- }
2076
- const contents: ListContactsCommandOutput = {
2077
- $metadata: deserializeMetadata(output),
2078
- contactList: undefined,
2079
- nextToken: undefined,
2080
- };
2081
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2082
- if (data.contactList !== undefined && data.contactList !== null) {
2083
- contents.contactList = deserializeAws_restJson1ContactList(data.contactList, context);
2084
- }
2085
- if (data.nextToken !== undefined && data.nextToken !== null) {
2086
- contents.nextToken = __expectString(data.nextToken);
2087
- }
2088
- return Promise.resolve(contents);
2089
- };
2090
-
2091
- const deserializeAws_restJson1ListContactsCommandError = async (
2092
- output: __HttpResponse,
2093
- context: __SerdeContext
2094
- ): Promise<ListContactsCommandOutput> => {
2095
- const parsedOutput: any = {
2096
- ...output,
2097
- body: await parseBody(output.body, context),
2098
- };
2099
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2100
- let errorCode = "UnknownError";
2101
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2102
- switch (errorCode) {
2103
- case "DependencyException":
2104
- case "com.amazonaws.groundstation#DependencyException":
2105
- response = {
2106
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2107
- name: errorCode,
2108
- $metadata: deserializeMetadata(output),
2109
- };
2110
- break;
2111
- case "InvalidParameterException":
2112
- case "com.amazonaws.groundstation#InvalidParameterException":
2113
- response = {
2114
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2115
- name: errorCode,
2116
- $metadata: deserializeMetadata(output),
2117
- };
2118
- break;
2119
- case "ResourceNotFoundException":
2120
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2121
- response = {
2122
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2123
- name: errorCode,
2124
- $metadata: deserializeMetadata(output),
2125
- };
2126
- break;
2127
- default:
2128
- const parsedBody = parsedOutput.body;
2129
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2130
- response = {
2131
- ...parsedBody,
2132
- name: `${errorCode}`,
2133
- message: parsedBody.message || parsedBody.Message || errorCode,
2134
- $fault: "client",
2135
- $metadata: deserializeMetadata(output),
2136
- } as any;
2137
- }
2138
- const message = response.message || response.Message || errorCode;
2139
- response.message = message;
2140
- delete response.Message;
2141
- return Promise.reject(Object.assign(new Error(message), response));
2142
- };
2143
-
2144
- export const deserializeAws_restJson1ListDataflowEndpointGroupsCommand = async (
2145
- output: __HttpResponse,
2146
- context: __SerdeContext
2147
- ): Promise<ListDataflowEndpointGroupsCommandOutput> => {
2148
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2149
- return deserializeAws_restJson1ListDataflowEndpointGroupsCommandError(output, context);
2150
- }
2151
- const contents: ListDataflowEndpointGroupsCommandOutput = {
2152
- $metadata: deserializeMetadata(output),
2153
- dataflowEndpointGroupList: undefined,
2154
- nextToken: undefined,
2155
- };
2156
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2157
- if (data.dataflowEndpointGroupList !== undefined && data.dataflowEndpointGroupList !== null) {
2158
- contents.dataflowEndpointGroupList = deserializeAws_restJson1DataflowEndpointGroupList(
2159
- data.dataflowEndpointGroupList,
2160
- context
2161
- );
2162
- }
2163
- if (data.nextToken !== undefined && data.nextToken !== null) {
2164
- contents.nextToken = __expectString(data.nextToken);
2165
- }
2166
- return Promise.resolve(contents);
2167
- };
2168
-
2169
- const deserializeAws_restJson1ListDataflowEndpointGroupsCommandError = async (
2170
- output: __HttpResponse,
2171
- context: __SerdeContext
2172
- ): Promise<ListDataflowEndpointGroupsCommandOutput> => {
2173
- const parsedOutput: any = {
2174
- ...output,
2175
- body: await parseBody(output.body, context),
2176
- };
2177
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2178
- let errorCode = "UnknownError";
2179
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2180
- switch (errorCode) {
2181
- case "DependencyException":
2182
- case "com.amazonaws.groundstation#DependencyException":
2183
- response = {
2184
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2185
- name: errorCode,
2186
- $metadata: deserializeMetadata(output),
2187
- };
2188
- break;
2189
- case "InvalidParameterException":
2190
- case "com.amazonaws.groundstation#InvalidParameterException":
2191
- response = {
2192
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2193
- name: errorCode,
2194
- $metadata: deserializeMetadata(output),
2195
- };
2196
- break;
2197
- case "ResourceNotFoundException":
2198
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2199
- response = {
2200
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2201
- name: errorCode,
2202
- $metadata: deserializeMetadata(output),
2203
- };
2204
- break;
2205
- default:
2206
- const parsedBody = parsedOutput.body;
2207
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2208
- response = {
2209
- ...parsedBody,
2210
- name: `${errorCode}`,
2211
- message: parsedBody.message || parsedBody.Message || errorCode,
2212
- $fault: "client",
2213
- $metadata: deserializeMetadata(output),
2214
- } as any;
2215
- }
2216
- const message = response.message || response.Message || errorCode;
2217
- response.message = message;
2218
- delete response.Message;
2219
- return Promise.reject(Object.assign(new Error(message), response));
2220
- };
2221
-
2222
- export const deserializeAws_restJson1ListGroundStationsCommand = async (
2223
- output: __HttpResponse,
2224
- context: __SerdeContext
2225
- ): Promise<ListGroundStationsCommandOutput> => {
2226
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2227
- return deserializeAws_restJson1ListGroundStationsCommandError(output, context);
2228
- }
2229
- const contents: ListGroundStationsCommandOutput = {
2230
- $metadata: deserializeMetadata(output),
2231
- groundStationList: undefined,
2232
- nextToken: undefined,
2233
- };
2234
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2235
- if (data.groundStationList !== undefined && data.groundStationList !== null) {
2236
- contents.groundStationList = deserializeAws_restJson1GroundStationList(data.groundStationList, context);
2237
- }
2238
- if (data.nextToken !== undefined && data.nextToken !== null) {
2239
- contents.nextToken = __expectString(data.nextToken);
2240
- }
2241
- return Promise.resolve(contents);
2242
- };
2243
-
2244
- const deserializeAws_restJson1ListGroundStationsCommandError = async (
2245
- output: __HttpResponse,
2246
- context: __SerdeContext
2247
- ): Promise<ListGroundStationsCommandOutput> => {
2248
- const parsedOutput: any = {
2249
- ...output,
2250
- body: await parseBody(output.body, context),
2251
- };
2252
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2253
- let errorCode = "UnknownError";
2254
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2255
- switch (errorCode) {
2256
- case "DependencyException":
2257
- case "com.amazonaws.groundstation#DependencyException":
2258
- response = {
2259
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2260
- name: errorCode,
2261
- $metadata: deserializeMetadata(output),
2262
- };
2263
- break;
2264
- case "InvalidParameterException":
2265
- case "com.amazonaws.groundstation#InvalidParameterException":
2266
- response = {
2267
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2268
- name: errorCode,
2269
- $metadata: deserializeMetadata(output),
2270
- };
2271
- break;
2272
- case "ResourceNotFoundException":
2273
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2274
- response = {
2275
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2276
- name: errorCode,
2277
- $metadata: deserializeMetadata(output),
2278
- };
2279
- break;
2280
- default:
2281
- const parsedBody = parsedOutput.body;
2282
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2283
- response = {
2284
- ...parsedBody,
2285
- name: `${errorCode}`,
2286
- message: parsedBody.message || parsedBody.Message || errorCode,
2287
- $fault: "client",
2288
- $metadata: deserializeMetadata(output),
2289
- } as any;
2290
- }
2291
- const message = response.message || response.Message || errorCode;
2292
- response.message = message;
2293
- delete response.Message;
2294
- return Promise.reject(Object.assign(new Error(message), response));
2295
- };
2296
-
2297
- export const deserializeAws_restJson1ListMissionProfilesCommand = async (
2298
- output: __HttpResponse,
2299
- context: __SerdeContext
2300
- ): Promise<ListMissionProfilesCommandOutput> => {
2301
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2302
- return deserializeAws_restJson1ListMissionProfilesCommandError(output, context);
2303
- }
2304
- const contents: ListMissionProfilesCommandOutput = {
2305
- $metadata: deserializeMetadata(output),
2306
- missionProfileList: undefined,
2307
- nextToken: undefined,
2308
- };
2309
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2310
- if (data.missionProfileList !== undefined && data.missionProfileList !== null) {
2311
- contents.missionProfileList = deserializeAws_restJson1MissionProfileList(data.missionProfileList, context);
2312
- }
2313
- if (data.nextToken !== undefined && data.nextToken !== null) {
2314
- contents.nextToken = __expectString(data.nextToken);
2315
- }
2316
- return Promise.resolve(contents);
2317
- };
2318
-
2319
- const deserializeAws_restJson1ListMissionProfilesCommandError = async (
2320
- output: __HttpResponse,
2321
- context: __SerdeContext
2322
- ): Promise<ListMissionProfilesCommandOutput> => {
2323
- const parsedOutput: any = {
2324
- ...output,
2325
- body: await parseBody(output.body, context),
2326
- };
2327
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2328
- let errorCode = "UnknownError";
2329
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2330
- switch (errorCode) {
2331
- case "DependencyException":
2332
- case "com.amazonaws.groundstation#DependencyException":
2333
- response = {
2334
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2335
- name: errorCode,
2336
- $metadata: deserializeMetadata(output),
2337
- };
2338
- break;
2339
- case "InvalidParameterException":
2340
- case "com.amazonaws.groundstation#InvalidParameterException":
2341
- response = {
2342
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2343
- name: errorCode,
2344
- $metadata: deserializeMetadata(output),
2345
- };
2346
- break;
2347
- case "ResourceNotFoundException":
2348
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2349
- response = {
2350
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2351
- name: errorCode,
2352
- $metadata: deserializeMetadata(output),
2353
- };
2354
- break;
2355
- default:
2356
- const parsedBody = parsedOutput.body;
2357
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2358
- response = {
2359
- ...parsedBody,
2360
- name: `${errorCode}`,
2361
- message: parsedBody.message || parsedBody.Message || errorCode,
2362
- $fault: "client",
2363
- $metadata: deserializeMetadata(output),
2364
- } as any;
2365
- }
2366
- const message = response.message || response.Message || errorCode;
2367
- response.message = message;
2368
- delete response.Message;
2369
- return Promise.reject(Object.assign(new Error(message), response));
2370
- };
2371
-
2372
- export const deserializeAws_restJson1ListSatellitesCommand = async (
2373
- output: __HttpResponse,
2374
- context: __SerdeContext
2375
- ): Promise<ListSatellitesCommandOutput> => {
2376
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2377
- return deserializeAws_restJson1ListSatellitesCommandError(output, context);
2378
- }
2379
- const contents: ListSatellitesCommandOutput = {
2380
- $metadata: deserializeMetadata(output),
2381
- nextToken: undefined,
2382
- satellites: undefined,
2383
- };
2384
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2385
- if (data.nextToken !== undefined && data.nextToken !== null) {
2386
- contents.nextToken = __expectString(data.nextToken);
2387
- }
2388
- if (data.satellites !== undefined && data.satellites !== null) {
2389
- contents.satellites = deserializeAws_restJson1SatelliteList(data.satellites, context);
2390
- }
2391
- return Promise.resolve(contents);
2392
- };
2393
-
2394
- const deserializeAws_restJson1ListSatellitesCommandError = async (
2395
- output: __HttpResponse,
2396
- context: __SerdeContext
2397
- ): Promise<ListSatellitesCommandOutput> => {
2398
- const parsedOutput: any = {
2399
- ...output,
2400
- body: await parseBody(output.body, context),
2401
- };
2402
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2403
- let errorCode = "UnknownError";
2404
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2405
- switch (errorCode) {
2406
- case "DependencyException":
2407
- case "com.amazonaws.groundstation#DependencyException":
2408
- response = {
2409
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2410
- name: errorCode,
2411
- $metadata: deserializeMetadata(output),
2412
- };
2413
- break;
2414
- case "InvalidParameterException":
2415
- case "com.amazonaws.groundstation#InvalidParameterException":
2416
- response = {
2417
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2418
- name: errorCode,
2419
- $metadata: deserializeMetadata(output),
2420
- };
2421
- break;
2422
- case "ResourceNotFoundException":
2423
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2424
- response = {
2425
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2426
- name: errorCode,
2427
- $metadata: deserializeMetadata(output),
2428
- };
2429
- break;
2430
- default:
2431
- const parsedBody = parsedOutput.body;
2432
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2433
- response = {
2434
- ...parsedBody,
2435
- name: `${errorCode}`,
2436
- message: parsedBody.message || parsedBody.Message || errorCode,
2437
- $fault: "client",
2438
- $metadata: deserializeMetadata(output),
2439
- } as any;
2440
- }
2441
- const message = response.message || response.Message || errorCode;
2442
- response.message = message;
2443
- delete response.Message;
2444
- return Promise.reject(Object.assign(new Error(message), response));
2445
- };
2446
-
2447
- export const deserializeAws_restJson1ListTagsForResourceCommand = async (
2448
- output: __HttpResponse,
2449
- context: __SerdeContext
2450
- ): Promise<ListTagsForResourceCommandOutput> => {
2451
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2452
- return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
2453
- }
2454
- const contents: ListTagsForResourceCommandOutput = {
2455
- $metadata: deserializeMetadata(output),
2456
- tags: undefined,
2457
- };
2458
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2459
- if (data.tags !== undefined && data.tags !== null) {
2460
- contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
2461
- }
2462
- return Promise.resolve(contents);
2463
- };
2464
-
2465
- const deserializeAws_restJson1ListTagsForResourceCommandError = async (
2466
- output: __HttpResponse,
2467
- context: __SerdeContext
2468
- ): Promise<ListTagsForResourceCommandOutput> => {
2469
- const parsedOutput: any = {
2470
- ...output,
2471
- body: await parseBody(output.body, context),
2472
- };
2473
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2474
- let errorCode = "UnknownError";
2475
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2476
- switch (errorCode) {
2477
- case "DependencyException":
2478
- case "com.amazonaws.groundstation#DependencyException":
2479
- response = {
2480
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2481
- name: errorCode,
2482
- $metadata: deserializeMetadata(output),
2483
- };
2484
- break;
2485
- case "InvalidParameterException":
2486
- case "com.amazonaws.groundstation#InvalidParameterException":
2487
- response = {
2488
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2489
- name: errorCode,
2490
- $metadata: deserializeMetadata(output),
2491
- };
2492
- break;
2493
- case "ResourceNotFoundException":
2494
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2495
- response = {
2496
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2497
- name: errorCode,
2498
- $metadata: deserializeMetadata(output),
2499
- };
2500
- break;
2501
- default:
2502
- const parsedBody = parsedOutput.body;
2503
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2504
- response = {
2505
- ...parsedBody,
2506
- name: `${errorCode}`,
2507
- message: parsedBody.message || parsedBody.Message || errorCode,
2508
- $fault: "client",
2509
- $metadata: deserializeMetadata(output),
2510
- } as any;
2511
- }
2512
- const message = response.message || response.Message || errorCode;
2513
- response.message = message;
2514
- delete response.Message;
2515
- return Promise.reject(Object.assign(new Error(message), response));
2516
- };
2517
-
2518
- export const deserializeAws_restJson1ReserveContactCommand = async (
2519
- output: __HttpResponse,
2520
- context: __SerdeContext
2521
- ): Promise<ReserveContactCommandOutput> => {
2522
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2523
- return deserializeAws_restJson1ReserveContactCommandError(output, context);
2524
- }
2525
- const contents: ReserveContactCommandOutput = {
2526
- $metadata: deserializeMetadata(output),
2527
- contactId: undefined,
2528
- };
2529
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2530
- if (data.contactId !== undefined && data.contactId !== null) {
2531
- contents.contactId = __expectString(data.contactId);
2532
- }
2533
- return Promise.resolve(contents);
2534
- };
2535
-
2536
- const deserializeAws_restJson1ReserveContactCommandError = async (
2537
- output: __HttpResponse,
2538
- context: __SerdeContext
2539
- ): Promise<ReserveContactCommandOutput> => {
2540
- const parsedOutput: any = {
2541
- ...output,
2542
- body: await parseBody(output.body, context),
2543
- };
2544
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2545
- let errorCode = "UnknownError";
2546
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2547
- switch (errorCode) {
2548
- case "DependencyException":
2549
- case "com.amazonaws.groundstation#DependencyException":
2550
- response = {
2551
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2552
- name: errorCode,
2553
- $metadata: deserializeMetadata(output),
2554
- };
2555
- break;
2556
- case "InvalidParameterException":
2557
- case "com.amazonaws.groundstation#InvalidParameterException":
2558
- response = {
2559
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2560
- name: errorCode,
2561
- $metadata: deserializeMetadata(output),
2562
- };
2563
- break;
2564
- case "ResourceNotFoundException":
2565
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2566
- response = {
2567
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2568
- name: errorCode,
2569
- $metadata: deserializeMetadata(output),
2570
- };
2571
- break;
2572
- default:
2573
- const parsedBody = parsedOutput.body;
2574
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2575
- response = {
2576
- ...parsedBody,
2577
- name: `${errorCode}`,
2578
- message: parsedBody.message || parsedBody.Message || errorCode,
2579
- $fault: "client",
2580
- $metadata: deserializeMetadata(output),
2581
- } as any;
2582
- }
2583
- const message = response.message || response.Message || errorCode;
2584
- response.message = message;
2585
- delete response.Message;
2586
- return Promise.reject(Object.assign(new Error(message), response));
2587
- };
2588
-
2589
- export const deserializeAws_restJson1TagResourceCommand = async (
2590
- output: __HttpResponse,
2591
- context: __SerdeContext
2592
- ): Promise<TagResourceCommandOutput> => {
2593
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2594
- return deserializeAws_restJson1TagResourceCommandError(output, context);
2595
- }
2596
- const contents: TagResourceCommandOutput = {
2597
- $metadata: deserializeMetadata(output),
2598
- };
2599
- await collectBody(output.body, context);
2600
- return Promise.resolve(contents);
2601
- };
2602
-
2603
- const deserializeAws_restJson1TagResourceCommandError = async (
2604
- output: __HttpResponse,
2605
- context: __SerdeContext
2606
- ): Promise<TagResourceCommandOutput> => {
2607
- const parsedOutput: any = {
2608
- ...output,
2609
- body: await parseBody(output.body, context),
2610
- };
2611
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2612
- let errorCode = "UnknownError";
2613
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2614
- switch (errorCode) {
2615
- case "DependencyException":
2616
- case "com.amazonaws.groundstation#DependencyException":
2617
- response = {
2618
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2619
- name: errorCode,
2620
- $metadata: deserializeMetadata(output),
2621
- };
2622
- break;
2623
- case "InvalidParameterException":
2624
- case "com.amazonaws.groundstation#InvalidParameterException":
2625
- response = {
2626
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2627
- name: errorCode,
2628
- $metadata: deserializeMetadata(output),
2629
- };
2630
- break;
2631
- case "ResourceNotFoundException":
2632
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2633
- response = {
2634
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2635
- name: errorCode,
2636
- $metadata: deserializeMetadata(output),
2637
- };
2638
- break;
2639
- default:
2640
- const parsedBody = parsedOutput.body;
2641
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2642
- response = {
2643
- ...parsedBody,
2644
- name: `${errorCode}`,
2645
- message: parsedBody.message || parsedBody.Message || errorCode,
2646
- $fault: "client",
2647
- $metadata: deserializeMetadata(output),
2648
- } as any;
2649
- }
2650
- const message = response.message || response.Message || errorCode;
2651
- response.message = message;
2652
- delete response.Message;
2653
- return Promise.reject(Object.assign(new Error(message), response));
2654
- };
2655
-
2656
- export const deserializeAws_restJson1UntagResourceCommand = async (
2657
- output: __HttpResponse,
2658
- context: __SerdeContext
2659
- ): Promise<UntagResourceCommandOutput> => {
2660
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2661
- return deserializeAws_restJson1UntagResourceCommandError(output, context);
2662
- }
2663
- const contents: UntagResourceCommandOutput = {
2664
- $metadata: deserializeMetadata(output),
2665
- };
2666
- await collectBody(output.body, context);
2667
- return Promise.resolve(contents);
2668
- };
2669
-
2670
- const deserializeAws_restJson1UntagResourceCommandError = async (
2671
- output: __HttpResponse,
2672
- context: __SerdeContext
2673
- ): Promise<UntagResourceCommandOutput> => {
2674
- const parsedOutput: any = {
2675
- ...output,
2676
- body: await parseBody(output.body, context),
2677
- };
2678
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2679
- let errorCode = "UnknownError";
2680
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2681
- switch (errorCode) {
2682
- case "DependencyException":
2683
- case "com.amazonaws.groundstation#DependencyException":
2684
- response = {
2685
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2686
- name: errorCode,
2687
- $metadata: deserializeMetadata(output),
2688
- };
2689
- break;
2690
- case "InvalidParameterException":
2691
- case "com.amazonaws.groundstation#InvalidParameterException":
2692
- response = {
2693
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2694
- name: errorCode,
2695
- $metadata: deserializeMetadata(output),
2696
- };
2697
- break;
2698
- case "ResourceNotFoundException":
2699
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2700
- response = {
2701
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2702
- name: errorCode,
2703
- $metadata: deserializeMetadata(output),
2704
- };
2705
- break;
2706
- default:
2707
- const parsedBody = parsedOutput.body;
2708
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2709
- response = {
2710
- ...parsedBody,
2711
- name: `${errorCode}`,
2712
- message: parsedBody.message || parsedBody.Message || errorCode,
2713
- $fault: "client",
2714
- $metadata: deserializeMetadata(output),
2715
- } as any;
2716
- }
2717
- const message = response.message || response.Message || errorCode;
2718
- response.message = message;
2719
- delete response.Message;
2720
- return Promise.reject(Object.assign(new Error(message), response));
2721
- };
2722
-
2723
- export const deserializeAws_restJson1UpdateConfigCommand = async (
2724
- output: __HttpResponse,
2725
- context: __SerdeContext
2726
- ): Promise<UpdateConfigCommandOutput> => {
2727
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2728
- return deserializeAws_restJson1UpdateConfigCommandError(output, context);
2729
- }
2730
- const contents: UpdateConfigCommandOutput = {
2731
- $metadata: deserializeMetadata(output),
2732
- configArn: undefined,
2733
- configId: undefined,
2734
- configType: undefined,
2735
- };
2736
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2737
- if (data.configArn !== undefined && data.configArn !== null) {
2738
- contents.configArn = __expectString(data.configArn);
2739
- }
2740
- if (data.configId !== undefined && data.configId !== null) {
2741
- contents.configId = __expectString(data.configId);
2742
- }
2743
- if (data.configType !== undefined && data.configType !== null) {
2744
- contents.configType = __expectString(data.configType);
2745
- }
2746
- return Promise.resolve(contents);
2747
- };
2748
-
2749
- const deserializeAws_restJson1UpdateConfigCommandError = async (
2750
- output: __HttpResponse,
2751
- context: __SerdeContext
2752
- ): Promise<UpdateConfigCommandOutput> => {
2753
- const parsedOutput: any = {
2754
- ...output,
2755
- body: await parseBody(output.body, context),
2756
- };
2757
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2758
- let errorCode = "UnknownError";
2759
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2760
- switch (errorCode) {
2761
- case "DependencyException":
2762
- case "com.amazonaws.groundstation#DependencyException":
2763
- response = {
2764
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2765
- name: errorCode,
2766
- $metadata: deserializeMetadata(output),
2767
- };
2768
- break;
2769
- case "InvalidParameterException":
2770
- case "com.amazonaws.groundstation#InvalidParameterException":
2771
- response = {
2772
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2773
- name: errorCode,
2774
- $metadata: deserializeMetadata(output),
2775
- };
2776
- break;
2777
- case "ResourceNotFoundException":
2778
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2779
- response = {
2780
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2781
- name: errorCode,
2782
- $metadata: deserializeMetadata(output),
2783
- };
2784
- break;
2785
- default:
2786
- const parsedBody = parsedOutput.body;
2787
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2788
- response = {
2789
- ...parsedBody,
2790
- name: `${errorCode}`,
2791
- message: parsedBody.message || parsedBody.Message || errorCode,
2792
- $fault: "client",
2793
- $metadata: deserializeMetadata(output),
2794
- } as any;
2795
- }
2796
- const message = response.message || response.Message || errorCode;
2797
- response.message = message;
2798
- delete response.Message;
2799
- return Promise.reject(Object.assign(new Error(message), response));
2800
- };
2801
-
2802
- export const deserializeAws_restJson1UpdateMissionProfileCommand = async (
2803
- output: __HttpResponse,
2804
- context: __SerdeContext
2805
- ): Promise<UpdateMissionProfileCommandOutput> => {
2806
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2807
- return deserializeAws_restJson1UpdateMissionProfileCommandError(output, context);
2808
- }
2809
- const contents: UpdateMissionProfileCommandOutput = {
2810
- $metadata: deserializeMetadata(output),
2811
- missionProfileId: undefined,
2812
- };
2813
- const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2814
- if (data.missionProfileId !== undefined && data.missionProfileId !== null) {
2815
- contents.missionProfileId = __expectString(data.missionProfileId);
2816
- }
2817
- return Promise.resolve(contents);
2818
- };
2819
-
2820
- const deserializeAws_restJson1UpdateMissionProfileCommandError = async (
2821
- output: __HttpResponse,
2822
- context: __SerdeContext
2823
- ): Promise<UpdateMissionProfileCommandOutput> => {
2824
- const parsedOutput: any = {
2825
- ...output,
2826
- body: await parseBody(output.body, context),
2827
- };
2828
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2829
- let errorCode = "UnknownError";
2830
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2831
- switch (errorCode) {
2832
- case "DependencyException":
2833
- case "com.amazonaws.groundstation#DependencyException":
2834
- response = {
2835
- ...(await deserializeAws_restJson1DependencyExceptionResponse(parsedOutput, context)),
2836
- name: errorCode,
2837
- $metadata: deserializeMetadata(output),
2838
- };
2839
- break;
2840
- case "InvalidParameterException":
2841
- case "com.amazonaws.groundstation#InvalidParameterException":
2842
- response = {
2843
- ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2844
- name: errorCode,
2845
- $metadata: deserializeMetadata(output),
2846
- };
2847
- break;
2848
- case "ResourceNotFoundException":
2849
- case "com.amazonaws.groundstation#ResourceNotFoundException":
2850
- response = {
2851
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2852
- name: errorCode,
2853
- $metadata: deserializeMetadata(output),
2854
- };
2855
- break;
2856
- default:
2857
- const parsedBody = parsedOutput.body;
2858
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2859
- response = {
2860
- ...parsedBody,
2861
- name: `${errorCode}`,
2862
- message: parsedBody.message || parsedBody.Message || errorCode,
2863
- $fault: "client",
2864
- $metadata: deserializeMetadata(output),
2865
- } as any;
2866
- }
2867
- const message = response.message || response.Message || errorCode;
2868
- response.message = message;
2869
- delete response.Message;
2870
- return Promise.reject(Object.assign(new Error(message), response));
2871
- };
2872
-
2873
- const deserializeAws_restJson1DependencyExceptionResponse = async (
2874
- parsedOutput: any,
2875
- context: __SerdeContext
2876
- ): Promise<DependencyException> => {
2877
- const contents: DependencyException = {
2878
- name: "DependencyException",
2879
- $fault: "server",
2880
- $metadata: deserializeMetadata(parsedOutput),
2881
- message: undefined,
2882
- parameterName: undefined,
2883
- };
2884
- const data: any = parsedOutput.body;
2885
- if (data.message !== undefined && data.message !== null) {
2886
- contents.message = __expectString(data.message);
2887
- }
2888
- if (data.parameterName !== undefined && data.parameterName !== null) {
2889
- contents.parameterName = __expectString(data.parameterName);
2890
- }
2891
- return contents;
2892
- };
2893
-
2894
- const deserializeAws_restJson1InvalidParameterExceptionResponse = async (
2895
- parsedOutput: any,
2896
- context: __SerdeContext
2897
- ): Promise<InvalidParameterException> => {
2898
- const contents: InvalidParameterException = {
2899
- name: "InvalidParameterException",
2900
- $fault: "client",
2901
- $metadata: deserializeMetadata(parsedOutput),
2902
- message: undefined,
2903
- parameterName: undefined,
2904
- };
2905
- const data: any = parsedOutput.body;
2906
- if (data.message !== undefined && data.message !== null) {
2907
- contents.message = __expectString(data.message);
2908
- }
2909
- if (data.parameterName !== undefined && data.parameterName !== null) {
2910
- contents.parameterName = __expectString(data.parameterName);
2911
- }
2912
- return contents;
2913
- };
2914
-
2915
- const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (
2916
- parsedOutput: any,
2917
- context: __SerdeContext
2918
- ): Promise<ResourceLimitExceededException> => {
2919
- const contents: ResourceLimitExceededException = {
2920
- name: "ResourceLimitExceededException",
2921
- $fault: "client",
2922
- $metadata: deserializeMetadata(parsedOutput),
2923
- message: undefined,
2924
- parameterName: undefined,
2925
- };
2926
- const data: any = parsedOutput.body;
2927
- if (data.message !== undefined && data.message !== null) {
2928
- contents.message = __expectString(data.message);
2929
- }
2930
- if (data.parameterName !== undefined && data.parameterName !== null) {
2931
- contents.parameterName = __expectString(data.parameterName);
2932
- }
2933
- return contents;
2934
- };
2935
-
2936
- const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (
2937
- parsedOutput: any,
2938
- context: __SerdeContext
2939
- ): Promise<ResourceNotFoundException> => {
2940
- const contents: ResourceNotFoundException = {
2941
- name: "ResourceNotFoundException",
2942
- $fault: "client",
2943
- $metadata: deserializeMetadata(parsedOutput),
2944
- message: undefined,
2945
- };
2946
- const data: any = parsedOutput.body;
2947
- if (data.message !== undefined && data.message !== null) {
2948
- contents.message = __expectString(data.message);
2949
- }
2950
- return contents;
2951
- };
2952
-
2953
- const serializeAws_restJson1AntennaDownlinkConfig = (input: AntennaDownlinkConfig, context: __SerdeContext): any => {
2954
- return {
2955
- ...(input.spectrumConfig !== undefined &&
2956
- input.spectrumConfig !== null && {
2957
- spectrumConfig: serializeAws_restJson1SpectrumConfig(input.spectrumConfig, context),
2958
- }),
2959
- };
2960
- };
2961
-
2962
- const serializeAws_restJson1AntennaDownlinkDemodDecodeConfig = (
2963
- input: AntennaDownlinkDemodDecodeConfig,
2964
- context: __SerdeContext
2965
- ): any => {
2966
- return {
2967
- ...(input.decodeConfig !== undefined &&
2968
- input.decodeConfig !== null && { decodeConfig: serializeAws_restJson1DecodeConfig(input.decodeConfig, context) }),
2969
- ...(input.demodulationConfig !== undefined &&
2970
- input.demodulationConfig !== null && {
2971
- demodulationConfig: serializeAws_restJson1DemodulationConfig(input.demodulationConfig, context),
2972
- }),
2973
- ...(input.spectrumConfig !== undefined &&
2974
- input.spectrumConfig !== null && {
2975
- spectrumConfig: serializeAws_restJson1SpectrumConfig(input.spectrumConfig, context),
2976
- }),
2977
- };
2978
- };
2979
-
2980
- const serializeAws_restJson1AntennaUplinkConfig = (input: AntennaUplinkConfig, context: __SerdeContext): any => {
2981
- return {
2982
- ...(input.spectrumConfig !== undefined &&
2983
- input.spectrumConfig !== null && {
2984
- spectrumConfig: serializeAws_restJson1UplinkSpectrumConfig(input.spectrumConfig, context),
2985
- }),
2986
- ...(input.targetEirp !== undefined &&
2987
- input.targetEirp !== null && { targetEirp: serializeAws_restJson1Eirp(input.targetEirp, context) }),
2988
- ...(input.transmitDisabled !== undefined &&
2989
- input.transmitDisabled !== null && { transmitDisabled: input.transmitDisabled }),
2990
- };
2991
- };
2992
-
2993
- const serializeAws_restJson1ConfigTypeData = (input: ConfigTypeData, context: __SerdeContext): any => {
2994
- return ConfigTypeData.visit(input, {
2995
- antennaDownlinkConfig: (value) => ({
2996
- antennaDownlinkConfig: serializeAws_restJson1AntennaDownlinkConfig(value, context),
2997
- }),
2998
- antennaDownlinkDemodDecodeConfig: (value) => ({
2999
- antennaDownlinkDemodDecodeConfig: serializeAws_restJson1AntennaDownlinkDemodDecodeConfig(value, context),
3000
- }),
3001
- antennaUplinkConfig: (value) => ({
3002
- antennaUplinkConfig: serializeAws_restJson1AntennaUplinkConfig(value, context),
3003
- }),
3004
- dataflowEndpointConfig: (value) => ({
3005
- dataflowEndpointConfig: serializeAws_restJson1DataflowEndpointConfig(value, context),
3006
- }),
3007
- s3RecordingConfig: (value) => ({ s3RecordingConfig: serializeAws_restJson1S3RecordingConfig(value, context) }),
3008
- trackingConfig: (value) => ({ trackingConfig: serializeAws_restJson1TrackingConfig(value, context) }),
3009
- uplinkEchoConfig: (value) => ({ uplinkEchoConfig: serializeAws_restJson1UplinkEchoConfig(value, context) }),
3010
- _: (name, value) => ({ name: value } as any),
3011
- });
3012
- };
3013
-
3014
- const serializeAws_restJson1DataflowEdge = (input: string[], context: __SerdeContext): any => {
3015
- return input
3016
- .filter((e: any) => e != null)
3017
- .map((entry) => {
3018
- if (entry === null) {
3019
- return null as any;
3020
- }
3021
- return entry;
3022
- });
3023
- };
3024
-
3025
- const serializeAws_restJson1DataflowEdgeList = (input: string[][], context: __SerdeContext): any => {
3026
- return input
3027
- .filter((e: any) => e != null)
3028
- .map((entry) => {
3029
- if (entry === null) {
3030
- return null as any;
3031
- }
3032
- return serializeAws_restJson1DataflowEdge(entry, context);
3033
- });
3034
- };
3035
-
3036
- const serializeAws_restJson1DataflowEndpoint = (input: DataflowEndpoint, context: __SerdeContext): any => {
3037
- return {
3038
- ...(input.address !== undefined &&
3039
- input.address !== null && { address: serializeAws_restJson1SocketAddress(input.address, context) }),
3040
- ...(input.mtu !== undefined && input.mtu !== null && { mtu: input.mtu }),
3041
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3042
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
3043
- };
3044
- };
3045
-
3046
- const serializeAws_restJson1DataflowEndpointConfig = (input: DataflowEndpointConfig, context: __SerdeContext): any => {
3047
- return {
3048
- ...(input.dataflowEndpointName !== undefined &&
3049
- input.dataflowEndpointName !== null && { dataflowEndpointName: input.dataflowEndpointName }),
3050
- ...(input.dataflowEndpointRegion !== undefined &&
3051
- input.dataflowEndpointRegion !== null && { dataflowEndpointRegion: input.dataflowEndpointRegion }),
3052
- };
3053
- };
3054
-
3055
- const serializeAws_restJson1DecodeConfig = (input: DecodeConfig, context: __SerdeContext): any => {
3056
- return {
3057
- ...(input.unvalidatedJSON !== undefined &&
3058
- input.unvalidatedJSON !== null && { unvalidatedJSON: input.unvalidatedJSON }),
3059
- };
3060
- };
3061
-
3062
- const serializeAws_restJson1DemodulationConfig = (input: DemodulationConfig, context: __SerdeContext): any => {
3063
- return {
3064
- ...(input.unvalidatedJSON !== undefined &&
3065
- input.unvalidatedJSON !== null && { unvalidatedJSON: input.unvalidatedJSON }),
3066
- };
3067
- };
3068
-
3069
- const serializeAws_restJson1Eirp = (input: Eirp, context: __SerdeContext): any => {
3070
- return {
3071
- ...(input.units !== undefined && input.units !== null && { units: input.units }),
3072
- ...(input.value !== undefined && input.value !== null && { value: __serializeFloat(input.value) }),
3073
- };
3074
- };
3075
-
3076
- const serializeAws_restJson1EndpointDetails = (input: EndpointDetails, context: __SerdeContext): any => {
3077
- return {
3078
- ...(input.endpoint !== undefined &&
3079
- input.endpoint !== null && { endpoint: serializeAws_restJson1DataflowEndpoint(input.endpoint, context) }),
3080
- ...(input.securityDetails !== undefined &&
3081
- input.securityDetails !== null && {
3082
- securityDetails: serializeAws_restJson1SecurityDetails(input.securityDetails, context),
3083
- }),
3084
- };
3085
- };
3086
-
3087
- const serializeAws_restJson1EndpointDetailsList = (input: EndpointDetails[], context: __SerdeContext): any => {
3088
- return input
3089
- .filter((e: any) => e != null)
3090
- .map((entry) => {
3091
- if (entry === null) {
3092
- return null as any;
3093
- }
3094
- return serializeAws_restJson1EndpointDetails(entry, context);
3095
- });
3096
- };
3097
-
3098
- const serializeAws_restJson1Frequency = (input: Frequency, context: __SerdeContext): any => {
3099
- return {
3100
- ...(input.units !== undefined && input.units !== null && { units: input.units }),
3101
- ...(input.value !== undefined && input.value !== null && { value: __serializeFloat(input.value) }),
3102
- };
3103
- };
3104
-
3105
- const serializeAws_restJson1FrequencyBandwidth = (input: FrequencyBandwidth, context: __SerdeContext): any => {
3106
- return {
3107
- ...(input.units !== undefined && input.units !== null && { units: input.units }),
3108
- ...(input.value !== undefined && input.value !== null && { value: __serializeFloat(input.value) }),
3109
- };
3110
- };
3111
-
3112
- const serializeAws_restJson1S3RecordingConfig = (input: S3RecordingConfig, context: __SerdeContext): any => {
3113
- return {
3114
- ...(input.bucketArn !== undefined && input.bucketArn !== null && { bucketArn: input.bucketArn }),
3115
- ...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }),
3116
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
3117
- };
3118
- };
3119
-
3120
- const serializeAws_restJson1SecurityDetails = (input: SecurityDetails, context: __SerdeContext): any => {
3121
- return {
3122
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
3123
- ...(input.securityGroupIds !== undefined &&
3124
- input.securityGroupIds !== null && {
3125
- securityGroupIds: serializeAws_restJson1SecurityGroupIdList(input.securityGroupIds, context),
3126
- }),
3127
- ...(input.subnetIds !== undefined &&
3128
- input.subnetIds !== null && { subnetIds: serializeAws_restJson1SubnetList(input.subnetIds, context) }),
3129
- };
3130
- };
3131
-
3132
- const serializeAws_restJson1SecurityGroupIdList = (input: string[], context: __SerdeContext): any => {
3133
- return input
3134
- .filter((e: any) => e != null)
3135
- .map((entry) => {
3136
- if (entry === null) {
3137
- return null as any;
3138
- }
3139
- return entry;
3140
- });
3141
- };
3142
-
3143
- const serializeAws_restJson1SocketAddress = (input: SocketAddress, context: __SerdeContext): any => {
3144
- return {
3145
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3146
- ...(input.port !== undefined && input.port !== null && { port: input.port }),
3147
- };
3148
- };
3149
-
3150
- const serializeAws_restJson1SpectrumConfig = (input: SpectrumConfig, context: __SerdeContext): any => {
3151
- return {
3152
- ...(input.bandwidth !== undefined &&
3153
- input.bandwidth !== null && { bandwidth: serializeAws_restJson1FrequencyBandwidth(input.bandwidth, context) }),
3154
- ...(input.centerFrequency !== undefined &&
3155
- input.centerFrequency !== null && {
3156
- centerFrequency: serializeAws_restJson1Frequency(input.centerFrequency, context),
3157
- }),
3158
- ...(input.polarization !== undefined && input.polarization !== null && { polarization: input.polarization }),
3159
- };
3160
- };
3161
-
3162
- const serializeAws_restJson1StatusList = (input: (ContactStatus | string)[], context: __SerdeContext): any => {
3163
- return input
3164
- .filter((e: any) => e != null)
3165
- .map((entry) => {
3166
- if (entry === null) {
3167
- return null as any;
3168
- }
3169
- return entry;
3170
- });
3171
- };
3172
-
3173
- const serializeAws_restJson1SubnetList = (input: string[], context: __SerdeContext): any => {
3174
- return input
3175
- .filter((e: any) => e != null)
3176
- .map((entry) => {
3177
- if (entry === null) {
3178
- return null as any;
3179
- }
3180
- return entry;
3181
- });
3182
- };
3183
-
3184
- const serializeAws_restJson1TagsMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
3185
- return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
3186
- if (value === null) {
3187
- return acc;
3188
- }
3189
- return {
3190
- ...acc,
3191
- [key]: value,
3192
- };
3193
- }, {});
3194
- };
3195
-
3196
- const serializeAws_restJson1TrackingConfig = (input: TrackingConfig, context: __SerdeContext): any => {
3197
- return {
3198
- ...(input.autotrack !== undefined && input.autotrack !== null && { autotrack: input.autotrack }),
3199
- };
3200
- };
3201
-
3202
- const serializeAws_restJson1UplinkEchoConfig = (input: UplinkEchoConfig, context: __SerdeContext): any => {
3203
- return {
3204
- ...(input.antennaUplinkConfigArn !== undefined &&
3205
- input.antennaUplinkConfigArn !== null && { antennaUplinkConfigArn: input.antennaUplinkConfigArn }),
3206
- ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
3207
- };
3208
- };
3209
-
3210
- const serializeAws_restJson1UplinkSpectrumConfig = (input: UplinkSpectrumConfig, context: __SerdeContext): any => {
3211
- return {
3212
- ...(input.centerFrequency !== undefined &&
3213
- input.centerFrequency !== null && {
3214
- centerFrequency: serializeAws_restJson1Frequency(input.centerFrequency, context),
3215
- }),
3216
- ...(input.polarization !== undefined && input.polarization !== null && { polarization: input.polarization }),
3217
- };
3218
- };
3219
-
3220
- const deserializeAws_restJson1AntennaDemodDecodeDetails = (
3221
- output: any,
3222
- context: __SerdeContext
3223
- ): AntennaDemodDecodeDetails => {
3224
- return {
3225
- outputNode: __expectString(output.outputNode),
3226
- } as any;
3227
- };
3228
-
3229
- const deserializeAws_restJson1AntennaDownlinkConfig = (output: any, context: __SerdeContext): AntennaDownlinkConfig => {
3230
- return {
3231
- spectrumConfig:
3232
- output.spectrumConfig !== undefined && output.spectrumConfig !== null
3233
- ? deserializeAws_restJson1SpectrumConfig(output.spectrumConfig, context)
3234
- : undefined,
3235
- } as any;
3236
- };
3237
-
3238
- const deserializeAws_restJson1AntennaDownlinkDemodDecodeConfig = (
3239
- output: any,
3240
- context: __SerdeContext
3241
- ): AntennaDownlinkDemodDecodeConfig => {
3242
- return {
3243
- decodeConfig:
3244
- output.decodeConfig !== undefined && output.decodeConfig !== null
3245
- ? deserializeAws_restJson1DecodeConfig(output.decodeConfig, context)
3246
- : undefined,
3247
- demodulationConfig:
3248
- output.demodulationConfig !== undefined && output.demodulationConfig !== null
3249
- ? deserializeAws_restJson1DemodulationConfig(output.demodulationConfig, context)
3250
- : undefined,
3251
- spectrumConfig:
3252
- output.spectrumConfig !== undefined && output.spectrumConfig !== null
3253
- ? deserializeAws_restJson1SpectrumConfig(output.spectrumConfig, context)
3254
- : undefined,
3255
- } as any;
3256
- };
3257
-
3258
- const deserializeAws_restJson1AntennaUplinkConfig = (output: any, context: __SerdeContext): AntennaUplinkConfig => {
3259
- return {
3260
- spectrumConfig:
3261
- output.spectrumConfig !== undefined && output.spectrumConfig !== null
3262
- ? deserializeAws_restJson1UplinkSpectrumConfig(output.spectrumConfig, context)
3263
- : undefined,
3264
- targetEirp:
3265
- output.targetEirp !== undefined && output.targetEirp !== null
3266
- ? deserializeAws_restJson1Eirp(output.targetEirp, context)
3267
- : undefined,
3268
- transmitDisabled: __expectBoolean(output.transmitDisabled),
3269
- } as any;
3270
- };
3271
-
3272
- const deserializeAws_restJson1ConfigDetails = (output: any, context: __SerdeContext): ConfigDetails => {
3273
- if (output.antennaDemodDecodeDetails !== undefined && output.antennaDemodDecodeDetails !== null) {
3274
- return {
3275
- antennaDemodDecodeDetails: deserializeAws_restJson1AntennaDemodDecodeDetails(
3276
- output.antennaDemodDecodeDetails,
3277
- context
3278
- ),
3279
- };
3280
- }
3281
- if (output.endpointDetails !== undefined && output.endpointDetails !== null) {
3282
- return {
3283
- endpointDetails: deserializeAws_restJson1EndpointDetails(output.endpointDetails, context),
3284
- };
3285
- }
3286
- if (output.s3RecordingDetails !== undefined && output.s3RecordingDetails !== null) {
3287
- return {
3288
- s3RecordingDetails: deserializeAws_restJson1S3RecordingDetails(output.s3RecordingDetails, context),
3289
- };
3290
- }
3291
- return { $unknown: Object.entries(output)[0] };
3292
- };
3293
-
3294
- const deserializeAws_restJson1ConfigList = (output: any, context: __SerdeContext): ConfigListItem[] => {
3295
- return (output || [])
3296
- .filter((e: any) => e != null)
3297
- .map((entry: any) => {
3298
- if (entry === null) {
3299
- return null as any;
3300
- }
3301
- return deserializeAws_restJson1ConfigListItem(entry, context);
3302
- });
3303
- };
3304
-
3305
- const deserializeAws_restJson1ConfigListItem = (output: any, context: __SerdeContext): ConfigListItem => {
3306
- return {
3307
- configArn: __expectString(output.configArn),
3308
- configId: __expectString(output.configId),
3309
- configType: __expectString(output.configType),
3310
- name: __expectString(output.name),
3311
- } as any;
3312
- };
3313
-
3314
- const deserializeAws_restJson1ConfigTypeData = (output: any, context: __SerdeContext): ConfigTypeData => {
3315
- if (output.antennaDownlinkConfig !== undefined && output.antennaDownlinkConfig !== null) {
3316
- return {
3317
- antennaDownlinkConfig: deserializeAws_restJson1AntennaDownlinkConfig(output.antennaDownlinkConfig, context),
3318
- };
3319
- }
3320
- if (output.antennaDownlinkDemodDecodeConfig !== undefined && output.antennaDownlinkDemodDecodeConfig !== null) {
3321
- return {
3322
- antennaDownlinkDemodDecodeConfig: deserializeAws_restJson1AntennaDownlinkDemodDecodeConfig(
3323
- output.antennaDownlinkDemodDecodeConfig,
3324
- context
3325
- ),
3326
- };
3327
- }
3328
- if (output.antennaUplinkConfig !== undefined && output.antennaUplinkConfig !== null) {
3329
- return {
3330
- antennaUplinkConfig: deserializeAws_restJson1AntennaUplinkConfig(output.antennaUplinkConfig, context),
3331
- };
3332
- }
3333
- if (output.dataflowEndpointConfig !== undefined && output.dataflowEndpointConfig !== null) {
3334
- return {
3335
- dataflowEndpointConfig: deserializeAws_restJson1DataflowEndpointConfig(output.dataflowEndpointConfig, context),
3336
- };
3337
- }
3338
- if (output.s3RecordingConfig !== undefined && output.s3RecordingConfig !== null) {
3339
- return {
3340
- s3RecordingConfig: deserializeAws_restJson1S3RecordingConfig(output.s3RecordingConfig, context),
3341
- };
3342
- }
3343
- if (output.trackingConfig !== undefined && output.trackingConfig !== null) {
3344
- return {
3345
- trackingConfig: deserializeAws_restJson1TrackingConfig(output.trackingConfig, context),
3346
- };
3347
- }
3348
- if (output.uplinkEchoConfig !== undefined && output.uplinkEchoConfig !== null) {
3349
- return {
3350
- uplinkEchoConfig: deserializeAws_restJson1UplinkEchoConfig(output.uplinkEchoConfig, context),
3351
- };
3352
- }
3353
- return { $unknown: Object.entries(output)[0] };
3354
- };
3355
-
3356
- const deserializeAws_restJson1ContactData = (output: any, context: __SerdeContext): ContactData => {
3357
- return {
3358
- contactId: __expectString(output.contactId),
3359
- contactStatus: __expectString(output.contactStatus),
3360
- endTime:
3361
- output.endTime !== undefined && output.endTime !== null
3362
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime)))
3363
- : undefined,
3364
- errorMessage: __expectString(output.errorMessage),
3365
- groundStation: __expectString(output.groundStation),
3366
- maximumElevation:
3367
- output.maximumElevation !== undefined && output.maximumElevation !== null
3368
- ? deserializeAws_restJson1Elevation(output.maximumElevation, context)
3369
- : undefined,
3370
- missionProfileArn: __expectString(output.missionProfileArn),
3371
- postPassEndTime:
3372
- output.postPassEndTime !== undefined && output.postPassEndTime !== null
3373
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.postPassEndTime)))
3374
- : undefined,
3375
- prePassStartTime:
3376
- output.prePassStartTime !== undefined && output.prePassStartTime !== null
3377
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.prePassStartTime)))
3378
- : undefined,
3379
- region: __expectString(output.region),
3380
- satelliteArn: __expectString(output.satelliteArn),
3381
- startTime:
3382
- output.startTime !== undefined && output.startTime !== null
3383
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime)))
3384
- : undefined,
3385
- tags:
3386
- output.tags !== undefined && output.tags !== null
3387
- ? deserializeAws_restJson1TagsMap(output.tags, context)
3388
- : undefined,
3389
- } as any;
3390
- };
3391
-
3392
- const deserializeAws_restJson1ContactList = (output: any, context: __SerdeContext): ContactData[] => {
3393
- return (output || [])
3394
- .filter((e: any) => e != null)
3395
- .map((entry: any) => {
3396
- if (entry === null) {
3397
- return null as any;
3398
- }
3399
- return deserializeAws_restJson1ContactData(entry, context);
3400
- });
3401
- };
3402
-
3403
- const deserializeAws_restJson1DataflowDetail = (output: any, context: __SerdeContext): DataflowDetail => {
3404
- return {
3405
- destination:
3406
- output.destination !== undefined && output.destination !== null
3407
- ? deserializeAws_restJson1Destination(output.destination, context)
3408
- : undefined,
3409
- errorMessage: __expectString(output.errorMessage),
3410
- source:
3411
- output.source !== undefined && output.source !== null
3412
- ? deserializeAws_restJson1Source(output.source, context)
3413
- : undefined,
3414
- } as any;
3415
- };
3416
-
3417
- const deserializeAws_restJson1DataflowEdge = (output: any, context: __SerdeContext): string[] => {
3418
- return (output || [])
3419
- .filter((e: any) => e != null)
3420
- .map((entry: any) => {
3421
- if (entry === null) {
3422
- return null as any;
3423
- }
3424
- return __expectString(entry) as any;
3425
- });
3426
- };
3427
-
3428
- const deserializeAws_restJson1DataflowEdgeList = (output: any, context: __SerdeContext): string[][] => {
3429
- return (output || [])
3430
- .filter((e: any) => e != null)
3431
- .map((entry: any) => {
3432
- if (entry === null) {
3433
- return null as any;
3434
- }
3435
- return deserializeAws_restJson1DataflowEdge(entry, context);
3436
- });
3437
- };
3438
-
3439
- const deserializeAws_restJson1DataflowEndpoint = (output: any, context: __SerdeContext): DataflowEndpoint => {
3440
- return {
3441
- address:
3442
- output.address !== undefined && output.address !== null
3443
- ? deserializeAws_restJson1SocketAddress(output.address, context)
3444
- : undefined,
3445
- mtu: __expectInt32(output.mtu),
3446
- name: __expectString(output.name),
3447
- status: __expectString(output.status),
3448
- } as any;
3449
- };
3450
-
3451
- const deserializeAws_restJson1DataflowEndpointConfig = (
3452
- output: any,
3453
- context: __SerdeContext
3454
- ): DataflowEndpointConfig => {
3455
- return {
3456
- dataflowEndpointName: __expectString(output.dataflowEndpointName),
3457
- dataflowEndpointRegion: __expectString(output.dataflowEndpointRegion),
3458
- } as any;
3459
- };
3460
-
3461
- const deserializeAws_restJson1DataflowEndpointGroupList = (
3462
- output: any,
3463
- context: __SerdeContext
3464
- ): DataflowEndpointListItem[] => {
3465
- return (output || [])
3466
- .filter((e: any) => e != null)
3467
- .map((entry: any) => {
3468
- if (entry === null) {
3469
- return null as any;
3470
- }
3471
- return deserializeAws_restJson1DataflowEndpointListItem(entry, context);
3472
- });
3473
- };
3474
-
3475
- const deserializeAws_restJson1DataflowEndpointListItem = (
3476
- output: any,
3477
- context: __SerdeContext
3478
- ): DataflowEndpointListItem => {
3479
- return {
3480
- dataflowEndpointGroupArn: __expectString(output.dataflowEndpointGroupArn),
3481
- dataflowEndpointGroupId: __expectString(output.dataflowEndpointGroupId),
3482
- } as any;
3483
- };
3484
-
3485
- const deserializeAws_restJson1DataflowList = (output: any, context: __SerdeContext): DataflowDetail[] => {
3486
- return (output || [])
3487
- .filter((e: any) => e != null)
3488
- .map((entry: any) => {
3489
- if (entry === null) {
3490
- return null as any;
3491
- }
3492
- return deserializeAws_restJson1DataflowDetail(entry, context);
3493
- });
3494
- };
3495
-
3496
- const deserializeAws_restJson1DecodeConfig = (output: any, context: __SerdeContext): DecodeConfig => {
3497
- return {
3498
- unvalidatedJSON: __expectString(output.unvalidatedJSON),
3499
- } as any;
3500
- };
3501
-
3502
- const deserializeAws_restJson1DemodulationConfig = (output: any, context: __SerdeContext): DemodulationConfig => {
3503
- return {
3504
- unvalidatedJSON: __expectString(output.unvalidatedJSON),
3505
- } as any;
3506
- };
3507
-
3508
- const deserializeAws_restJson1Destination = (output: any, context: __SerdeContext): Destination => {
3509
- return {
3510
- configDetails:
3511
- output.configDetails !== undefined && output.configDetails !== null
3512
- ? deserializeAws_restJson1ConfigDetails(__expectUnion(output.configDetails), context)
3513
- : undefined,
3514
- configId: __expectString(output.configId),
3515
- configType: __expectString(output.configType),
3516
- dataflowDestinationRegion: __expectString(output.dataflowDestinationRegion),
3517
- } as any;
3518
- };
3519
-
3520
- const deserializeAws_restJson1Eirp = (output: any, context: __SerdeContext): Eirp => {
3521
- return {
3522
- units: __expectString(output.units),
3523
- value: __limitedParseDouble(output.value),
3524
- } as any;
3525
- };
3526
-
3527
- const deserializeAws_restJson1Elevation = (output: any, context: __SerdeContext): Elevation => {
3528
- return {
3529
- unit: __expectString(output.unit),
3530
- value: __limitedParseDouble(output.value),
3531
- } as any;
3532
- };
3533
-
3534
- const deserializeAws_restJson1EndpointDetails = (output: any, context: __SerdeContext): EndpointDetails => {
3535
- return {
3536
- endpoint:
3537
- output.endpoint !== undefined && output.endpoint !== null
3538
- ? deserializeAws_restJson1DataflowEndpoint(output.endpoint, context)
3539
- : undefined,
3540
- securityDetails:
3541
- output.securityDetails !== undefined && output.securityDetails !== null
3542
- ? deserializeAws_restJson1SecurityDetails(output.securityDetails, context)
3543
- : undefined,
3544
- } as any;
3545
- };
3546
-
3547
- const deserializeAws_restJson1EndpointDetailsList = (output: any, context: __SerdeContext): EndpointDetails[] => {
3548
- return (output || [])
3549
- .filter((e: any) => e != null)
3550
- .map((entry: any) => {
3551
- if (entry === null) {
3552
- return null as any;
3553
- }
3554
- return deserializeAws_restJson1EndpointDetails(entry, context);
3555
- });
3556
- };
3557
-
3558
- const deserializeAws_restJson1Frequency = (output: any, context: __SerdeContext): Frequency => {
3559
- return {
3560
- units: __expectString(output.units),
3561
- value: __limitedParseDouble(output.value),
3562
- } as any;
3563
- };
3564
-
3565
- const deserializeAws_restJson1FrequencyBandwidth = (output: any, context: __SerdeContext): FrequencyBandwidth => {
3566
- return {
3567
- units: __expectString(output.units),
3568
- value: __limitedParseDouble(output.value),
3569
- } as any;
3570
- };
3571
-
3572
- const deserializeAws_restJson1GroundStationData = (output: any, context: __SerdeContext): GroundStationData => {
3573
- return {
3574
- groundStationId: __expectString(output.groundStationId),
3575
- groundStationName: __expectString(output.groundStationName),
3576
- region: __expectString(output.region),
3577
- } as any;
3578
- };
3579
-
3580
- const deserializeAws_restJson1GroundStationIdList = (output: any, context: __SerdeContext): string[] => {
3581
- return (output || [])
3582
- .filter((e: any) => e != null)
3583
- .map((entry: any) => {
3584
- if (entry === null) {
3585
- return null as any;
3586
- }
3587
- return __expectString(entry) as any;
3588
- });
3589
- };
3590
-
3591
- const deserializeAws_restJson1GroundStationList = (output: any, context: __SerdeContext): GroundStationData[] => {
3592
- return (output || [])
3593
- .filter((e: any) => e != null)
3594
- .map((entry: any) => {
3595
- if (entry === null) {
3596
- return null as any;
3597
- }
3598
- return deserializeAws_restJson1GroundStationData(entry, context);
3599
- });
3600
- };
3601
-
3602
- const deserializeAws_restJson1MissionProfileList = (output: any, context: __SerdeContext): MissionProfileListItem[] => {
3603
- return (output || [])
3604
- .filter((e: any) => e != null)
3605
- .map((entry: any) => {
3606
- if (entry === null) {
3607
- return null as any;
3608
- }
3609
- return deserializeAws_restJson1MissionProfileListItem(entry, context);
3610
- });
3611
- };
3612
-
3613
- const deserializeAws_restJson1MissionProfileListItem = (
3614
- output: any,
3615
- context: __SerdeContext
3616
- ): MissionProfileListItem => {
3617
- return {
3618
- missionProfileArn: __expectString(output.missionProfileArn),
3619
- missionProfileId: __expectString(output.missionProfileId),
3620
- name: __expectString(output.name),
3621
- region: __expectString(output.region),
3622
- } as any;
3623
- };
3624
-
3625
- const deserializeAws_restJson1S3RecordingConfig = (output: any, context: __SerdeContext): S3RecordingConfig => {
3626
- return {
3627
- bucketArn: __expectString(output.bucketArn),
3628
- prefix: __expectString(output.prefix),
3629
- roleArn: __expectString(output.roleArn),
3630
- } as any;
3631
- };
3632
-
3633
- const deserializeAws_restJson1S3RecordingDetails = (output: any, context: __SerdeContext): S3RecordingDetails => {
3634
- return {
3635
- bucketArn: __expectString(output.bucketArn),
3636
- keyTemplate: __expectString(output.keyTemplate),
3637
- } as any;
3638
- };
3639
-
3640
- const deserializeAws_restJson1SatelliteList = (output: any, context: __SerdeContext): SatelliteListItem[] => {
3641
- return (output || [])
3642
- .filter((e: any) => e != null)
3643
- .map((entry: any) => {
3644
- if (entry === null) {
3645
- return null as any;
3646
- }
3647
- return deserializeAws_restJson1SatelliteListItem(entry, context);
3648
- });
3649
- };
3650
-
3651
- const deserializeAws_restJson1SatelliteListItem = (output: any, context: __SerdeContext): SatelliteListItem => {
3652
- return {
3653
- groundStations:
3654
- output.groundStations !== undefined && output.groundStations !== null
3655
- ? deserializeAws_restJson1GroundStationIdList(output.groundStations, context)
3656
- : undefined,
3657
- noradSatelliteID: __expectInt32(output.noradSatelliteID),
3658
- satelliteArn: __expectString(output.satelliteArn),
3659
- satelliteId: __expectString(output.satelliteId),
3660
- } as any;
3661
- };
3662
-
3663
- const deserializeAws_restJson1SecurityDetails = (output: any, context: __SerdeContext): SecurityDetails => {
3664
- return {
3665
- roleArn: __expectString(output.roleArn),
3666
- securityGroupIds:
3667
- output.securityGroupIds !== undefined && output.securityGroupIds !== null
3668
- ? deserializeAws_restJson1SecurityGroupIdList(output.securityGroupIds, context)
3669
- : undefined,
3670
- subnetIds:
3671
- output.subnetIds !== undefined && output.subnetIds !== null
3672
- ? deserializeAws_restJson1SubnetList(output.subnetIds, context)
3673
- : undefined,
3674
- } as any;
3675
- };
3676
-
3677
- const deserializeAws_restJson1SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => {
3678
- return (output || [])
3679
- .filter((e: any) => e != null)
3680
- .map((entry: any) => {
3681
- if (entry === null) {
3682
- return null as any;
3683
- }
3684
- return __expectString(entry) as any;
3685
- });
3686
- };
3687
-
3688
- const deserializeAws_restJson1SocketAddress = (output: any, context: __SerdeContext): SocketAddress => {
3689
- return {
3690
- name: __expectString(output.name),
3691
- port: __expectInt32(output.port),
3692
- } as any;
3693
- };
3694
-
3695
- const deserializeAws_restJson1Source = (output: any, context: __SerdeContext): Source => {
3696
- return {
3697
- configDetails:
3698
- output.configDetails !== undefined && output.configDetails !== null
3699
- ? deserializeAws_restJson1ConfigDetails(__expectUnion(output.configDetails), context)
3700
- : undefined,
3701
- configId: __expectString(output.configId),
3702
- configType: __expectString(output.configType),
3703
- dataflowSourceRegion: __expectString(output.dataflowSourceRegion),
3704
- } as any;
3705
- };
3706
-
3707
- const deserializeAws_restJson1SpectrumConfig = (output: any, context: __SerdeContext): SpectrumConfig => {
3708
- return {
3709
- bandwidth:
3710
- output.bandwidth !== undefined && output.bandwidth !== null
3711
- ? deserializeAws_restJson1FrequencyBandwidth(output.bandwidth, context)
3712
- : undefined,
3713
- centerFrequency:
3714
- output.centerFrequency !== undefined && output.centerFrequency !== null
3715
- ? deserializeAws_restJson1Frequency(output.centerFrequency, context)
3716
- : undefined,
3717
- polarization: __expectString(output.polarization),
3718
- } as any;
3719
- };
3720
-
3721
- const deserializeAws_restJson1SubnetList = (output: any, context: __SerdeContext): string[] => {
3722
- return (output || [])
3723
- .filter((e: any) => e != null)
3724
- .map((entry: any) => {
3725
- if (entry === null) {
3726
- return null as any;
3727
- }
3728
- return __expectString(entry) as any;
3729
- });
3730
- };
3731
-
3732
- const deserializeAws_restJson1TagsMap = (output: any, context: __SerdeContext): { [key: string]: string } => {
3733
- return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
3734
- if (value === null) {
3735
- return acc;
3736
- }
3737
- return {
3738
- ...acc,
3739
- [key]: __expectString(value) as any,
3740
- };
3741
- }, {});
3742
- };
3743
-
3744
- const deserializeAws_restJson1TrackingConfig = (output: any, context: __SerdeContext): TrackingConfig => {
3745
- return {
3746
- autotrack: __expectString(output.autotrack),
3747
- } as any;
3748
- };
3749
-
3750
- const deserializeAws_restJson1UplinkEchoConfig = (output: any, context: __SerdeContext): UplinkEchoConfig => {
3751
- return {
3752
- antennaUplinkConfigArn: __expectString(output.antennaUplinkConfigArn),
3753
- enabled: __expectBoolean(output.enabled),
3754
- } as any;
3755
- };
3756
-
3757
- const deserializeAws_restJson1UplinkSpectrumConfig = (output: any, context: __SerdeContext): UplinkSpectrumConfig => {
3758
- return {
3759
- centerFrequency:
3760
- output.centerFrequency !== undefined && output.centerFrequency !== null
3761
- ? deserializeAws_restJson1Frequency(output.centerFrequency, context)
3762
- : undefined,
3763
- polarization: __expectString(output.polarization),
3764
- } as any;
3765
- };
3766
-
3767
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
3768
- httpStatusCode: output.statusCode,
3769
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
3770
- extendedRequestId: output.headers["x-amz-id-2"],
3771
- cfId: output.headers["x-amz-cf-id"],
3772
- });
3773
-
3774
- // Collect low-level response body stream to Uint8Array.
3775
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
3776
- if (streamBody instanceof Uint8Array) {
3777
- return Promise.resolve(streamBody);
3778
- }
3779
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3780
- };
3781
-
3782
- // Encode Uint8Array data into string with utf-8.
3783
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
3784
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3785
-
3786
- const isSerializableHeaderValue = (value: any): boolean =>
3787
- value !== undefined &&
3788
- value !== null &&
3789
- value !== "" &&
3790
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3791
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
3792
-
3793
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
3794
- collectBodyString(streamBody, context).then((encoded) => {
3795
- if (encoded.length) {
3796
- return JSON.parse(encoded);
3797
- }
3798
- return {};
3799
- });
3800
-
3801
- /**
3802
- * Load an error code for the aws.rest-json-1.1 protocol.
3803
- */
3804
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
3805
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3806
-
3807
- const sanitizeErrorCode = (rawValue: string): string => {
3808
- let cleanValue = rawValue;
3809
- if (cleanValue.indexOf(":") >= 0) {
3810
- cleanValue = cleanValue.split(":")[0];
3811
- }
3812
- if (cleanValue.indexOf("#") >= 0) {
3813
- cleanValue = cleanValue.split("#")[1];
3814
- }
3815
- return cleanValue;
3816
- };
3817
-
3818
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3819
- if (headerKey !== undefined) {
3820
- return sanitizeErrorCode(output.headers[headerKey]);
3821
- }
3822
-
3823
- if (data.code !== undefined) {
3824
- return sanitizeErrorCode(data.code);
3825
- }
3826
-
3827
- if (data["__type"] !== undefined) {
3828
- return sanitizeErrorCode(data["__type"]);
3829
- }
3830
-
3831
- return "";
3832
- };