@aws-sdk/client-pipes 3.222.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 (115) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +207 -0
  3. package/dist-cjs/Pipes.js +157 -0
  4. package/dist-cjs/PipesClient.js +40 -0
  5. package/dist-cjs/commands/CreatePipeCommand.js +46 -0
  6. package/dist-cjs/commands/DeletePipeCommand.js +46 -0
  7. package/dist-cjs/commands/DescribePipeCommand.js +46 -0
  8. package/dist-cjs/commands/ListPipesCommand.js +46 -0
  9. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  10. package/dist-cjs/commands/StartPipeCommand.js +46 -0
  11. package/dist-cjs/commands/StopPipeCommand.js +46 -0
  12. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  13. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  14. package/dist-cjs/commands/UpdatePipeCommand.js +46 -0
  15. package/dist-cjs/commands/index.js +13 -0
  16. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  17. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  18. package/dist-cjs/endpoint/ruleset.js +312 -0
  19. package/dist-cjs/index.js +11 -0
  20. package/dist-cjs/models/PipesServiceException.js +11 -0
  21. package/dist-cjs/models/index.js +4 -0
  22. package/dist-cjs/models/models_0.js +704 -0
  23. package/dist-cjs/pagination/Interfaces.js +2 -0
  24. package/dist-cjs/pagination/ListPipesPaginator.js +36 -0
  25. package/dist-cjs/pagination/index.js +5 -0
  26. package/dist-cjs/protocols/Aws_restJson1.js +2591 -0
  27. package/dist-cjs/runtimeConfig.browser.js +42 -0
  28. package/dist-cjs/runtimeConfig.js +50 -0
  29. package/dist-cjs/runtimeConfig.native.js +15 -0
  30. package/dist-cjs/runtimeConfig.shared.js +18 -0
  31. package/dist-es/Pipes.js +153 -0
  32. package/dist-es/PipesClient.js +36 -0
  33. package/dist-es/commands/CreatePipeCommand.js +42 -0
  34. package/dist-es/commands/DeletePipeCommand.js +42 -0
  35. package/dist-es/commands/DescribePipeCommand.js +42 -0
  36. package/dist-es/commands/ListPipesCommand.js +42 -0
  37. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  38. package/dist-es/commands/StartPipeCommand.js +42 -0
  39. package/dist-es/commands/StopPipeCommand.js +42 -0
  40. package/dist-es/commands/TagResourceCommand.js +42 -0
  41. package/dist-es/commands/UntagResourceCommand.js +42 -0
  42. package/dist-es/commands/UpdatePipeCommand.js +42 -0
  43. package/dist-es/commands/index.js +10 -0
  44. package/dist-es/endpoint/EndpointParameters.js +8 -0
  45. package/dist-es/endpoint/endpointResolver.js +8 -0
  46. package/dist-es/endpoint/ruleset.js +309 -0
  47. package/dist-es/index.js +6 -0
  48. package/dist-es/models/PipesServiceException.js +7 -0
  49. package/dist-es/models/index.js +1 -0
  50. package/dist-es/models/models_0.js +614 -0
  51. package/dist-es/pagination/Interfaces.js +1 -0
  52. package/dist-es/pagination/ListPipesPaginator.js +32 -0
  53. package/dist-es/pagination/index.js +2 -0
  54. package/dist-es/protocols/Aws_restJson1.js +2568 -0
  55. package/dist-es/runtimeConfig.browser.js +37 -0
  56. package/dist-es/runtimeConfig.js +45 -0
  57. package/dist-es/runtimeConfig.native.js +11 -0
  58. package/dist-es/runtimeConfig.shared.js +14 -0
  59. package/dist-types/Pipes.d.ts +95 -0
  60. package/dist-types/PipesClient.d.ts +153 -0
  61. package/dist-types/commands/CreatePipeCommand.d.ts +37 -0
  62. package/dist-types/commands/DeletePipeCommand.d.ts +37 -0
  63. package/dist-types/commands/DescribePipeCommand.d.ts +37 -0
  64. package/dist-types/commands/ListPipesCommand.d.ts +37 -0
  65. package/dist-types/commands/ListTagsForResourceCommand.d.ts +37 -0
  66. package/dist-types/commands/StartPipeCommand.d.ts +37 -0
  67. package/dist-types/commands/StopPipeCommand.d.ts +37 -0
  68. package/dist-types/commands/TagResourceCommand.d.ts +47 -0
  69. package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
  70. package/dist-types/commands/UpdatePipeCommand.d.ts +43 -0
  71. package/dist-types/commands/index.d.ts +10 -0
  72. package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
  73. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  74. package/dist-types/endpoint/ruleset.d.ts +2 -0
  75. package/dist-types/index.d.ts +6 -0
  76. package/dist-types/models/PipesServiceException.d.ts +10 -0
  77. package/dist-types/models/index.d.ts +1 -0
  78. package/dist-types/models/models_0.d.ts +2541 -0
  79. package/dist-types/pagination/Interfaces.d.ts +6 -0
  80. package/dist-types/pagination/ListPipesPaginator.d.ts +4 -0
  81. package/dist-types/pagination/index.d.ts +2 -0
  82. package/dist-types/protocols/Aws_restJson1.d.ts +32 -0
  83. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  84. package/dist-types/runtimeConfig.d.ts +42 -0
  85. package/dist-types/runtimeConfig.native.d.ts +41 -0
  86. package/dist-types/runtimeConfig.shared.d.ts +16 -0
  87. package/dist-types/ts3.4/Pipes.d.ts +174 -0
  88. package/dist-types/ts3.4/PipesClient.d.ts +171 -0
  89. package/dist-types/ts3.4/commands/CreatePipeCommand.d.ts +34 -0
  90. package/dist-types/ts3.4/commands/DeletePipeCommand.d.ts +34 -0
  91. package/dist-types/ts3.4/commands/DescribePipeCommand.d.ts +34 -0
  92. package/dist-types/ts3.4/commands/ListPipesCommand.d.ts +34 -0
  93. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  94. package/dist-types/ts3.4/commands/StartPipeCommand.d.ts +34 -0
  95. package/dist-types/ts3.4/commands/StopPipeCommand.d.ts +34 -0
  96. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
  97. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
  98. package/dist-types/ts3.4/commands/UpdatePipeCommand.d.ts +34 -0
  99. package/dist-types/ts3.4/commands/index.d.ts +10 -0
  100. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -0
  101. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  102. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  103. package/dist-types/ts3.4/index.d.ts +6 -0
  104. package/dist-types/ts3.4/models/PipesServiceException.d.ts +7 -0
  105. package/dist-types/ts3.4/models/index.d.ts +1 -0
  106. package/dist-types/ts3.4/models/models_0.d.ts +915 -0
  107. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  108. package/dist-types/ts3.4/pagination/ListPipesPaginator.d.ts +11 -0
  109. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  110. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +125 -0
  111. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +88 -0
  112. package/dist-types/ts3.4/runtimeConfig.d.ts +88 -0
  113. package/dist-types/ts3.4/runtimeConfig.native.d.ts +77 -0
  114. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +16 -0
  115. package/package.json +102 -0
@@ -0,0 +1,2568 @@
1
+ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
3
+ import { ConflictException, InternalException, MQBrokerAccessCredentials, MSKAccessCredentials, NotFoundException, SelfManagedKafkaAccessConfigurationCredentials, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
+ import { PipesServiceException as __BaseException } from "../models/PipesServiceException";
5
+ export const serializeAws_restJson1CreatePipeCommand = async (input, context) => {
6
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const headers = {
8
+ "content-type": "application/json",
9
+ };
10
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}";
11
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
12
+ let body;
13
+ body = JSON.stringify({
14
+ ...(input.Description != null && { Description: input.Description }),
15
+ ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
16
+ ...(input.Enrichment != null && { Enrichment: input.Enrichment }),
17
+ ...(input.EnrichmentParameters != null && {
18
+ EnrichmentParameters: serializeAws_restJson1PipeEnrichmentParameters(input.EnrichmentParameters, context),
19
+ }),
20
+ ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
21
+ ...(input.Source != null && { Source: input.Source }),
22
+ ...(input.SourceParameters != null && {
23
+ SourceParameters: serializeAws_restJson1PipeSourceParameters(input.SourceParameters, context),
24
+ }),
25
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
26
+ ...(input.Target != null && { Target: input.Target }),
27
+ ...(input.TargetParameters != null && {
28
+ TargetParameters: serializeAws_restJson1PipeTargetParameters(input.TargetParameters, context),
29
+ }),
30
+ });
31
+ return new __HttpRequest({
32
+ protocol,
33
+ hostname,
34
+ port,
35
+ method: "POST",
36
+ headers,
37
+ path: resolvedPath,
38
+ body,
39
+ });
40
+ };
41
+ export const serializeAws_restJson1DeletePipeCommand = async (input, context) => {
42
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
43
+ const headers = {};
44
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}";
45
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
46
+ let body;
47
+ return new __HttpRequest({
48
+ protocol,
49
+ hostname,
50
+ port,
51
+ method: "DELETE",
52
+ headers,
53
+ path: resolvedPath,
54
+ body,
55
+ });
56
+ };
57
+ export const serializeAws_restJson1DescribePipeCommand = async (input, context) => {
58
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
59
+ const headers = {};
60
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}";
61
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
62
+ let body;
63
+ return new __HttpRequest({
64
+ protocol,
65
+ hostname,
66
+ port,
67
+ method: "GET",
68
+ headers,
69
+ path: resolvedPath,
70
+ body,
71
+ });
72
+ };
73
+ export const serializeAws_restJson1ListPipesCommand = async (input, context) => {
74
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const headers = {};
76
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes";
77
+ const query = map({
78
+ NamePrefix: [, input.NamePrefix],
79
+ DesiredState: [, input.DesiredState],
80
+ CurrentState: [, input.CurrentState],
81
+ SourcePrefix: [, input.SourcePrefix],
82
+ TargetPrefix: [, input.TargetPrefix],
83
+ NextToken: [, input.NextToken],
84
+ Limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
85
+ });
86
+ let body;
87
+ return new __HttpRequest({
88
+ protocol,
89
+ hostname,
90
+ port,
91
+ method: "GET",
92
+ headers,
93
+ path: resolvedPath,
94
+ query,
95
+ body,
96
+ });
97
+ };
98
+ export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
99
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const headers = {};
101
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
102
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
103
+ let body;
104
+ return new __HttpRequest({
105
+ protocol,
106
+ hostname,
107
+ port,
108
+ method: "GET",
109
+ headers,
110
+ path: resolvedPath,
111
+ body,
112
+ });
113
+ };
114
+ export const serializeAws_restJson1StartPipeCommand = async (input, context) => {
115
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const headers = {};
117
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}/start";
118
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
119
+ let body;
120
+ return new __HttpRequest({
121
+ protocol,
122
+ hostname,
123
+ port,
124
+ method: "POST",
125
+ headers,
126
+ path: resolvedPath,
127
+ body,
128
+ });
129
+ };
130
+ export const serializeAws_restJson1StopPipeCommand = async (input, context) => {
131
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const headers = {};
133
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}/stop";
134
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
135
+ let body;
136
+ return new __HttpRequest({
137
+ protocol,
138
+ hostname,
139
+ port,
140
+ method: "POST",
141
+ headers,
142
+ path: resolvedPath,
143
+ body,
144
+ });
145
+ };
146
+ export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
147
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const headers = {
149
+ "content-type": "application/json",
150
+ };
151
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
152
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
153
+ let body;
154
+ body = JSON.stringify({
155
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
156
+ });
157
+ return new __HttpRequest({
158
+ protocol,
159
+ hostname,
160
+ port,
161
+ method: "POST",
162
+ headers,
163
+ path: resolvedPath,
164
+ body,
165
+ });
166
+ };
167
+ export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
168
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const headers = {};
170
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
171
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
172
+ const query = map({
173
+ tagKeys: [
174
+ __expectNonNull(input.tagKeys, `tagKeys`) != null,
175
+ () => (input.tagKeys || []).map((_entry) => _entry),
176
+ ],
177
+ });
178
+ let body;
179
+ return new __HttpRequest({
180
+ protocol,
181
+ hostname,
182
+ port,
183
+ method: "DELETE",
184
+ headers,
185
+ path: resolvedPath,
186
+ query,
187
+ body,
188
+ });
189
+ };
190
+ export const serializeAws_restJson1UpdatePipeCommand = async (input, context) => {
191
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
192
+ const headers = {
193
+ "content-type": "application/json",
194
+ };
195
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}";
196
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
197
+ let body;
198
+ body = JSON.stringify({
199
+ ...(input.Description != null && { Description: input.Description }),
200
+ ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
201
+ ...(input.Enrichment != null && { Enrichment: input.Enrichment }),
202
+ ...(input.EnrichmentParameters != null && {
203
+ EnrichmentParameters: serializeAws_restJson1PipeEnrichmentParameters(input.EnrichmentParameters, context),
204
+ }),
205
+ ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
206
+ ...(input.SourceParameters != null && {
207
+ SourceParameters: serializeAws_restJson1UpdatePipeSourceParameters(input.SourceParameters, context),
208
+ }),
209
+ ...(input.Target != null && { Target: input.Target }),
210
+ ...(input.TargetParameters != null && {
211
+ TargetParameters: serializeAws_restJson1PipeTargetParameters(input.TargetParameters, context),
212
+ }),
213
+ });
214
+ return new __HttpRequest({
215
+ protocol,
216
+ hostname,
217
+ port,
218
+ method: "PUT",
219
+ headers,
220
+ path: resolvedPath,
221
+ body,
222
+ });
223
+ };
224
+ export const deserializeAws_restJson1CreatePipeCommand = async (output, context) => {
225
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
226
+ return deserializeAws_restJson1CreatePipeCommandError(output, context);
227
+ }
228
+ const contents = map({
229
+ $metadata: deserializeMetadata(output),
230
+ });
231
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
232
+ if (data.Arn != null) {
233
+ contents.Arn = __expectString(data.Arn);
234
+ }
235
+ if (data.CreationTime != null) {
236
+ contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
237
+ }
238
+ if (data.CurrentState != null) {
239
+ contents.CurrentState = __expectString(data.CurrentState);
240
+ }
241
+ if (data.DesiredState != null) {
242
+ contents.DesiredState = __expectString(data.DesiredState);
243
+ }
244
+ if (data.LastModifiedTime != null) {
245
+ contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
246
+ }
247
+ if (data.Name != null) {
248
+ contents.Name = __expectString(data.Name);
249
+ }
250
+ return contents;
251
+ };
252
+ const deserializeAws_restJson1CreatePipeCommandError = async (output, context) => {
253
+ const parsedOutput = {
254
+ ...output,
255
+ body: await parseErrorBody(output.body, context),
256
+ };
257
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
258
+ switch (errorCode) {
259
+ case "ConflictException":
260
+ case "com.amazonaws.pipes#ConflictException":
261
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
262
+ case "InternalException":
263
+ case "com.amazonaws.pipes#InternalException":
264
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
265
+ case "NotFoundException":
266
+ case "com.amazonaws.pipes#NotFoundException":
267
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
268
+ case "ServiceQuotaExceededException":
269
+ case "com.amazonaws.pipes#ServiceQuotaExceededException":
270
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
271
+ case "ThrottlingException":
272
+ case "com.amazonaws.pipes#ThrottlingException":
273
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
274
+ case "ValidationException":
275
+ case "com.amazonaws.pipes#ValidationException":
276
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
277
+ default:
278
+ const parsedBody = parsedOutput.body;
279
+ throwDefaultError({
280
+ output,
281
+ parsedBody,
282
+ exceptionCtor: __BaseException,
283
+ errorCode,
284
+ });
285
+ }
286
+ };
287
+ export const deserializeAws_restJson1DeletePipeCommand = async (output, context) => {
288
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
289
+ return deserializeAws_restJson1DeletePipeCommandError(output, context);
290
+ }
291
+ const contents = map({
292
+ $metadata: deserializeMetadata(output),
293
+ });
294
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
295
+ if (data.Arn != null) {
296
+ contents.Arn = __expectString(data.Arn);
297
+ }
298
+ if (data.CreationTime != null) {
299
+ contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
300
+ }
301
+ if (data.CurrentState != null) {
302
+ contents.CurrentState = __expectString(data.CurrentState);
303
+ }
304
+ if (data.DesiredState != null) {
305
+ contents.DesiredState = __expectString(data.DesiredState);
306
+ }
307
+ if (data.LastModifiedTime != null) {
308
+ contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
309
+ }
310
+ if (data.Name != null) {
311
+ contents.Name = __expectString(data.Name);
312
+ }
313
+ return contents;
314
+ };
315
+ const deserializeAws_restJson1DeletePipeCommandError = async (output, context) => {
316
+ const parsedOutput = {
317
+ ...output,
318
+ body: await parseErrorBody(output.body, context),
319
+ };
320
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
321
+ switch (errorCode) {
322
+ case "ConflictException":
323
+ case "com.amazonaws.pipes#ConflictException":
324
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
325
+ case "InternalException":
326
+ case "com.amazonaws.pipes#InternalException":
327
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
328
+ case "NotFoundException":
329
+ case "com.amazonaws.pipes#NotFoundException":
330
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
331
+ case "ThrottlingException":
332
+ case "com.amazonaws.pipes#ThrottlingException":
333
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
334
+ case "ValidationException":
335
+ case "com.amazonaws.pipes#ValidationException":
336
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
337
+ default:
338
+ const parsedBody = parsedOutput.body;
339
+ throwDefaultError({
340
+ output,
341
+ parsedBody,
342
+ exceptionCtor: __BaseException,
343
+ errorCode,
344
+ });
345
+ }
346
+ };
347
+ export const deserializeAws_restJson1DescribePipeCommand = async (output, context) => {
348
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
349
+ return deserializeAws_restJson1DescribePipeCommandError(output, context);
350
+ }
351
+ const contents = map({
352
+ $metadata: deserializeMetadata(output),
353
+ });
354
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
355
+ if (data.Arn != null) {
356
+ contents.Arn = __expectString(data.Arn);
357
+ }
358
+ if (data.CreationTime != null) {
359
+ contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
360
+ }
361
+ if (data.CurrentState != null) {
362
+ contents.CurrentState = __expectString(data.CurrentState);
363
+ }
364
+ if (data.Description != null) {
365
+ contents.Description = __expectString(data.Description);
366
+ }
367
+ if (data.DesiredState != null) {
368
+ contents.DesiredState = __expectString(data.DesiredState);
369
+ }
370
+ if (data.Enrichment != null) {
371
+ contents.Enrichment = __expectString(data.Enrichment);
372
+ }
373
+ if (data.EnrichmentParameters != null) {
374
+ contents.EnrichmentParameters = deserializeAws_restJson1PipeEnrichmentParameters(data.EnrichmentParameters, context);
375
+ }
376
+ if (data.LastModifiedTime != null) {
377
+ contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
378
+ }
379
+ if (data.Name != null) {
380
+ contents.Name = __expectString(data.Name);
381
+ }
382
+ if (data.RoleArn != null) {
383
+ contents.RoleArn = __expectString(data.RoleArn);
384
+ }
385
+ if (data.Source != null) {
386
+ contents.Source = __expectString(data.Source);
387
+ }
388
+ if (data.SourceParameters != null) {
389
+ contents.SourceParameters = deserializeAws_restJson1PipeSourceParameters(data.SourceParameters, context);
390
+ }
391
+ if (data.StateReason != null) {
392
+ contents.StateReason = __expectString(data.StateReason);
393
+ }
394
+ if (data.Tags != null) {
395
+ contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
396
+ }
397
+ if (data.Target != null) {
398
+ contents.Target = __expectString(data.Target);
399
+ }
400
+ if (data.TargetParameters != null) {
401
+ contents.TargetParameters = deserializeAws_restJson1PipeTargetParameters(data.TargetParameters, context);
402
+ }
403
+ return contents;
404
+ };
405
+ const deserializeAws_restJson1DescribePipeCommandError = async (output, context) => {
406
+ const parsedOutput = {
407
+ ...output,
408
+ body: await parseErrorBody(output.body, context),
409
+ };
410
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
411
+ switch (errorCode) {
412
+ case "InternalException":
413
+ case "com.amazonaws.pipes#InternalException":
414
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
415
+ case "NotFoundException":
416
+ case "com.amazonaws.pipes#NotFoundException":
417
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
418
+ case "ThrottlingException":
419
+ case "com.amazonaws.pipes#ThrottlingException":
420
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
421
+ case "ValidationException":
422
+ case "com.amazonaws.pipes#ValidationException":
423
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
424
+ default:
425
+ const parsedBody = parsedOutput.body;
426
+ throwDefaultError({
427
+ output,
428
+ parsedBody,
429
+ exceptionCtor: __BaseException,
430
+ errorCode,
431
+ });
432
+ }
433
+ };
434
+ export const deserializeAws_restJson1ListPipesCommand = async (output, context) => {
435
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
436
+ return deserializeAws_restJson1ListPipesCommandError(output, context);
437
+ }
438
+ const contents = map({
439
+ $metadata: deserializeMetadata(output),
440
+ });
441
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
442
+ if (data.NextToken != null) {
443
+ contents.NextToken = __expectString(data.NextToken);
444
+ }
445
+ if (data.Pipes != null) {
446
+ contents.Pipes = deserializeAws_restJson1PipeList(data.Pipes, context);
447
+ }
448
+ return contents;
449
+ };
450
+ const deserializeAws_restJson1ListPipesCommandError = async (output, context) => {
451
+ const parsedOutput = {
452
+ ...output,
453
+ body: await parseErrorBody(output.body, context),
454
+ };
455
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
456
+ switch (errorCode) {
457
+ case "InternalException":
458
+ case "com.amazonaws.pipes#InternalException":
459
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
460
+ case "ThrottlingException":
461
+ case "com.amazonaws.pipes#ThrottlingException":
462
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
463
+ case "ValidationException":
464
+ case "com.amazonaws.pipes#ValidationException":
465
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
466
+ default:
467
+ const parsedBody = parsedOutput.body;
468
+ throwDefaultError({
469
+ output,
470
+ parsedBody,
471
+ exceptionCtor: __BaseException,
472
+ errorCode,
473
+ });
474
+ }
475
+ };
476
+ export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
477
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
478
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
479
+ }
480
+ const contents = map({
481
+ $metadata: deserializeMetadata(output),
482
+ });
483
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
484
+ if (data.tags != null) {
485
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
486
+ }
487
+ return contents;
488
+ };
489
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
490
+ const parsedOutput = {
491
+ ...output,
492
+ body: await parseErrorBody(output.body, context),
493
+ };
494
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
495
+ switch (errorCode) {
496
+ case "InternalException":
497
+ case "com.amazonaws.pipes#InternalException":
498
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
499
+ case "NotFoundException":
500
+ case "com.amazonaws.pipes#NotFoundException":
501
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
502
+ case "ValidationException":
503
+ case "com.amazonaws.pipes#ValidationException":
504
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
505
+ default:
506
+ const parsedBody = parsedOutput.body;
507
+ throwDefaultError({
508
+ output,
509
+ parsedBody,
510
+ exceptionCtor: __BaseException,
511
+ errorCode,
512
+ });
513
+ }
514
+ };
515
+ export const deserializeAws_restJson1StartPipeCommand = async (output, context) => {
516
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
517
+ return deserializeAws_restJson1StartPipeCommandError(output, context);
518
+ }
519
+ const contents = map({
520
+ $metadata: deserializeMetadata(output),
521
+ });
522
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
523
+ if (data.Arn != null) {
524
+ contents.Arn = __expectString(data.Arn);
525
+ }
526
+ if (data.CreationTime != null) {
527
+ contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
528
+ }
529
+ if (data.CurrentState != null) {
530
+ contents.CurrentState = __expectString(data.CurrentState);
531
+ }
532
+ if (data.DesiredState != null) {
533
+ contents.DesiredState = __expectString(data.DesiredState);
534
+ }
535
+ if (data.LastModifiedTime != null) {
536
+ contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
537
+ }
538
+ if (data.Name != null) {
539
+ contents.Name = __expectString(data.Name);
540
+ }
541
+ return contents;
542
+ };
543
+ const deserializeAws_restJson1StartPipeCommandError = async (output, context) => {
544
+ const parsedOutput = {
545
+ ...output,
546
+ body: await parseErrorBody(output.body, context),
547
+ };
548
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
549
+ switch (errorCode) {
550
+ case "ConflictException":
551
+ case "com.amazonaws.pipes#ConflictException":
552
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
553
+ case "InternalException":
554
+ case "com.amazonaws.pipes#InternalException":
555
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
556
+ case "NotFoundException":
557
+ case "com.amazonaws.pipes#NotFoundException":
558
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
559
+ case "ThrottlingException":
560
+ case "com.amazonaws.pipes#ThrottlingException":
561
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
562
+ case "ValidationException":
563
+ case "com.amazonaws.pipes#ValidationException":
564
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
565
+ default:
566
+ const parsedBody = parsedOutput.body;
567
+ throwDefaultError({
568
+ output,
569
+ parsedBody,
570
+ exceptionCtor: __BaseException,
571
+ errorCode,
572
+ });
573
+ }
574
+ };
575
+ export const deserializeAws_restJson1StopPipeCommand = async (output, context) => {
576
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
577
+ return deserializeAws_restJson1StopPipeCommandError(output, context);
578
+ }
579
+ const contents = map({
580
+ $metadata: deserializeMetadata(output),
581
+ });
582
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
583
+ if (data.Arn != null) {
584
+ contents.Arn = __expectString(data.Arn);
585
+ }
586
+ if (data.CreationTime != null) {
587
+ contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
588
+ }
589
+ if (data.CurrentState != null) {
590
+ contents.CurrentState = __expectString(data.CurrentState);
591
+ }
592
+ if (data.DesiredState != null) {
593
+ contents.DesiredState = __expectString(data.DesiredState);
594
+ }
595
+ if (data.LastModifiedTime != null) {
596
+ contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
597
+ }
598
+ if (data.Name != null) {
599
+ contents.Name = __expectString(data.Name);
600
+ }
601
+ return contents;
602
+ };
603
+ const deserializeAws_restJson1StopPipeCommandError = async (output, context) => {
604
+ const parsedOutput = {
605
+ ...output,
606
+ body: await parseErrorBody(output.body, context),
607
+ };
608
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
+ switch (errorCode) {
610
+ case "ConflictException":
611
+ case "com.amazonaws.pipes#ConflictException":
612
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
613
+ case "InternalException":
614
+ case "com.amazonaws.pipes#InternalException":
615
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
616
+ case "NotFoundException":
617
+ case "com.amazonaws.pipes#NotFoundException":
618
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
619
+ case "ThrottlingException":
620
+ case "com.amazonaws.pipes#ThrottlingException":
621
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
622
+ case "ValidationException":
623
+ case "com.amazonaws.pipes#ValidationException":
624
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
625
+ default:
626
+ const parsedBody = parsedOutput.body;
627
+ throwDefaultError({
628
+ output,
629
+ parsedBody,
630
+ exceptionCtor: __BaseException,
631
+ errorCode,
632
+ });
633
+ }
634
+ };
635
+ export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
636
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
637
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
638
+ }
639
+ const contents = map({
640
+ $metadata: deserializeMetadata(output),
641
+ });
642
+ await collectBody(output.body, context);
643
+ return contents;
644
+ };
645
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
646
+ const parsedOutput = {
647
+ ...output,
648
+ body: await parseErrorBody(output.body, context),
649
+ };
650
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
651
+ switch (errorCode) {
652
+ case "InternalException":
653
+ case "com.amazonaws.pipes#InternalException":
654
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
655
+ case "NotFoundException":
656
+ case "com.amazonaws.pipes#NotFoundException":
657
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
658
+ case "ValidationException":
659
+ case "com.amazonaws.pipes#ValidationException":
660
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
661
+ default:
662
+ const parsedBody = parsedOutput.body;
663
+ throwDefaultError({
664
+ output,
665
+ parsedBody,
666
+ exceptionCtor: __BaseException,
667
+ errorCode,
668
+ });
669
+ }
670
+ };
671
+ export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
672
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
673
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
674
+ }
675
+ const contents = map({
676
+ $metadata: deserializeMetadata(output),
677
+ });
678
+ await collectBody(output.body, context);
679
+ return contents;
680
+ };
681
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
682
+ const parsedOutput = {
683
+ ...output,
684
+ body: await parseErrorBody(output.body, context),
685
+ };
686
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
687
+ switch (errorCode) {
688
+ case "InternalException":
689
+ case "com.amazonaws.pipes#InternalException":
690
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
691
+ case "NotFoundException":
692
+ case "com.amazonaws.pipes#NotFoundException":
693
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
694
+ case "ValidationException":
695
+ case "com.amazonaws.pipes#ValidationException":
696
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
697
+ default:
698
+ const parsedBody = parsedOutput.body;
699
+ throwDefaultError({
700
+ output,
701
+ parsedBody,
702
+ exceptionCtor: __BaseException,
703
+ errorCode,
704
+ });
705
+ }
706
+ };
707
+ export const deserializeAws_restJson1UpdatePipeCommand = async (output, context) => {
708
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
709
+ return deserializeAws_restJson1UpdatePipeCommandError(output, context);
710
+ }
711
+ const contents = map({
712
+ $metadata: deserializeMetadata(output),
713
+ });
714
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
715
+ if (data.Arn != null) {
716
+ contents.Arn = __expectString(data.Arn);
717
+ }
718
+ if (data.CreationTime != null) {
719
+ contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
720
+ }
721
+ if (data.CurrentState != null) {
722
+ contents.CurrentState = __expectString(data.CurrentState);
723
+ }
724
+ if (data.DesiredState != null) {
725
+ contents.DesiredState = __expectString(data.DesiredState);
726
+ }
727
+ if (data.LastModifiedTime != null) {
728
+ contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
729
+ }
730
+ if (data.Name != null) {
731
+ contents.Name = __expectString(data.Name);
732
+ }
733
+ return contents;
734
+ };
735
+ const deserializeAws_restJson1UpdatePipeCommandError = async (output, context) => {
736
+ const parsedOutput = {
737
+ ...output,
738
+ body: await parseErrorBody(output.body, context),
739
+ };
740
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
741
+ switch (errorCode) {
742
+ case "ConflictException":
743
+ case "com.amazonaws.pipes#ConflictException":
744
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
745
+ case "InternalException":
746
+ case "com.amazonaws.pipes#InternalException":
747
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
748
+ case "NotFoundException":
749
+ case "com.amazonaws.pipes#NotFoundException":
750
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
751
+ case "ThrottlingException":
752
+ case "com.amazonaws.pipes#ThrottlingException":
753
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
754
+ case "ValidationException":
755
+ case "com.amazonaws.pipes#ValidationException":
756
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
757
+ default:
758
+ const parsedBody = parsedOutput.body;
759
+ throwDefaultError({
760
+ output,
761
+ parsedBody,
762
+ exceptionCtor: __BaseException,
763
+ errorCode,
764
+ });
765
+ }
766
+ };
767
+ const map = __map;
768
+ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
769
+ const contents = map({});
770
+ const data = parsedOutput.body;
771
+ if (data.message != null) {
772
+ contents.message = __expectString(data.message);
773
+ }
774
+ if (data.resourceId != null) {
775
+ contents.resourceId = __expectString(data.resourceId);
776
+ }
777
+ if (data.resourceType != null) {
778
+ contents.resourceType = __expectString(data.resourceType);
779
+ }
780
+ const exception = new ConflictException({
781
+ $metadata: deserializeMetadata(parsedOutput),
782
+ ...contents,
783
+ });
784
+ return __decorateServiceException(exception, parsedOutput.body);
785
+ };
786
+ const deserializeAws_restJson1InternalExceptionResponse = async (parsedOutput, context) => {
787
+ const contents = map({
788
+ retryAfterSeconds: [
789
+ () => void 0 !== parsedOutput.headers["retry-after"],
790
+ () => __strictParseInt32(parsedOutput.headers["retry-after"]),
791
+ ],
792
+ });
793
+ const data = parsedOutput.body;
794
+ if (data.message != null) {
795
+ contents.message = __expectString(data.message);
796
+ }
797
+ const exception = new InternalException({
798
+ $metadata: deserializeMetadata(parsedOutput),
799
+ ...contents,
800
+ });
801
+ return __decorateServiceException(exception, parsedOutput.body);
802
+ };
803
+ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
804
+ const contents = map({});
805
+ const data = parsedOutput.body;
806
+ if (data.message != null) {
807
+ contents.message = __expectString(data.message);
808
+ }
809
+ const exception = new NotFoundException({
810
+ $metadata: deserializeMetadata(parsedOutput),
811
+ ...contents,
812
+ });
813
+ return __decorateServiceException(exception, parsedOutput.body);
814
+ };
815
+ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
816
+ const contents = map({});
817
+ const data = parsedOutput.body;
818
+ if (data.message != null) {
819
+ contents.message = __expectString(data.message);
820
+ }
821
+ if (data.quotaCode != null) {
822
+ contents.quotaCode = __expectString(data.quotaCode);
823
+ }
824
+ if (data.resourceId != null) {
825
+ contents.resourceId = __expectString(data.resourceId);
826
+ }
827
+ if (data.resourceType != null) {
828
+ contents.resourceType = __expectString(data.resourceType);
829
+ }
830
+ if (data.serviceCode != null) {
831
+ contents.serviceCode = __expectString(data.serviceCode);
832
+ }
833
+ const exception = new ServiceQuotaExceededException({
834
+ $metadata: deserializeMetadata(parsedOutput),
835
+ ...contents,
836
+ });
837
+ return __decorateServiceException(exception, parsedOutput.body);
838
+ };
839
+ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
840
+ const contents = map({
841
+ retryAfterSeconds: [
842
+ () => void 0 !== parsedOutput.headers["retry-after"],
843
+ () => __strictParseInt32(parsedOutput.headers["retry-after"]),
844
+ ],
845
+ });
846
+ const data = parsedOutput.body;
847
+ if (data.message != null) {
848
+ contents.message = __expectString(data.message);
849
+ }
850
+ if (data.quotaCode != null) {
851
+ contents.quotaCode = __expectString(data.quotaCode);
852
+ }
853
+ if (data.serviceCode != null) {
854
+ contents.serviceCode = __expectString(data.serviceCode);
855
+ }
856
+ const exception = new ThrottlingException({
857
+ $metadata: deserializeMetadata(parsedOutput),
858
+ ...contents,
859
+ });
860
+ return __decorateServiceException(exception, parsedOutput.body);
861
+ };
862
+ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
863
+ const contents = map({});
864
+ const data = parsedOutput.body;
865
+ if (data.fieldList != null) {
866
+ contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
867
+ }
868
+ if (data.message != null) {
869
+ contents.message = __expectString(data.message);
870
+ }
871
+ const exception = new ValidationException({
872
+ $metadata: deserializeMetadata(parsedOutput),
873
+ ...contents,
874
+ });
875
+ return __decorateServiceException(exception, parsedOutput.body);
876
+ };
877
+ const serializeAws_restJson1AwsVpcConfiguration = (input, context) => {
878
+ return {
879
+ ...(input.AssignPublicIp != null && { AssignPublicIp: input.AssignPublicIp }),
880
+ ...(input.SecurityGroups != null && {
881
+ SecurityGroups: serializeAws_restJson1SecurityGroups(input.SecurityGroups, context),
882
+ }),
883
+ ...(input.Subnets != null && { Subnets: serializeAws_restJson1Subnets(input.Subnets, context) }),
884
+ };
885
+ };
886
+ const serializeAws_restJson1BatchArrayProperties = (input, context) => {
887
+ return {
888
+ ...(input.Size != null && { Size: input.Size }),
889
+ };
890
+ };
891
+ const serializeAws_restJson1BatchContainerOverrides = (input, context) => {
892
+ return {
893
+ ...(input.Command != null && { Command: serializeAws_restJson1StringList(input.Command, context) }),
894
+ ...(input.Environment != null && {
895
+ Environment: serializeAws_restJson1BatchEnvironmentVariableList(input.Environment, context),
896
+ }),
897
+ ...(input.InstanceType != null && { InstanceType: input.InstanceType }),
898
+ ...(input.ResourceRequirements != null && {
899
+ ResourceRequirements: serializeAws_restJson1BatchResourceRequirementsList(input.ResourceRequirements, context),
900
+ }),
901
+ };
902
+ };
903
+ const serializeAws_restJson1BatchDependsOn = (input, context) => {
904
+ return input
905
+ .filter((e) => e != null)
906
+ .map((entry) => {
907
+ return serializeAws_restJson1BatchJobDependency(entry, context);
908
+ });
909
+ };
910
+ const serializeAws_restJson1BatchEnvironmentVariable = (input, context) => {
911
+ return {
912
+ ...(input.Name != null && { Name: input.Name }),
913
+ ...(input.Value != null && { Value: input.Value }),
914
+ };
915
+ };
916
+ const serializeAws_restJson1BatchEnvironmentVariableList = (input, context) => {
917
+ return input
918
+ .filter((e) => e != null)
919
+ .map((entry) => {
920
+ return serializeAws_restJson1BatchEnvironmentVariable(entry, context);
921
+ });
922
+ };
923
+ const serializeAws_restJson1BatchJobDependency = (input, context) => {
924
+ return {
925
+ ...(input.JobId != null && { JobId: input.JobId }),
926
+ ...(input.Type != null && { Type: input.Type }),
927
+ };
928
+ };
929
+ const serializeAws_restJson1BatchParametersMap = (input, context) => {
930
+ return Object.entries(input).reduce((acc, [key, value]) => {
931
+ if (value === null) {
932
+ return acc;
933
+ }
934
+ acc[key] = value;
935
+ return acc;
936
+ }, {});
937
+ };
938
+ const serializeAws_restJson1BatchResourceRequirement = (input, context) => {
939
+ return {
940
+ ...(input.Type != null && { Type: input.Type }),
941
+ ...(input.Value != null && { Value: input.Value }),
942
+ };
943
+ };
944
+ const serializeAws_restJson1BatchResourceRequirementsList = (input, context) => {
945
+ return input
946
+ .filter((e) => e != null)
947
+ .map((entry) => {
948
+ return serializeAws_restJson1BatchResourceRequirement(entry, context);
949
+ });
950
+ };
951
+ const serializeAws_restJson1BatchRetryStrategy = (input, context) => {
952
+ return {
953
+ ...(input.Attempts != null && { Attempts: input.Attempts }),
954
+ };
955
+ };
956
+ const serializeAws_restJson1CapacityProviderStrategy = (input, context) => {
957
+ return input
958
+ .filter((e) => e != null)
959
+ .map((entry) => {
960
+ return serializeAws_restJson1CapacityProviderStrategyItem(entry, context);
961
+ });
962
+ };
963
+ const serializeAws_restJson1CapacityProviderStrategyItem = (input, context) => {
964
+ return {
965
+ ...(input.base != null && { base: input.base }),
966
+ ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }),
967
+ ...(input.weight != null && { weight: input.weight }),
968
+ };
969
+ };
970
+ const serializeAws_restJson1DeadLetterConfig = (input, context) => {
971
+ return {
972
+ ...(input.Arn != null && { Arn: input.Arn }),
973
+ };
974
+ };
975
+ const serializeAws_restJson1EcsContainerOverride = (input, context) => {
976
+ return {
977
+ ...(input.Command != null && { Command: serializeAws_restJson1StringList(input.Command, context) }),
978
+ ...(input.Cpu != null && { Cpu: input.Cpu }),
979
+ ...(input.Environment != null && {
980
+ Environment: serializeAws_restJson1EcsEnvironmentVariableList(input.Environment, context),
981
+ }),
982
+ ...(input.EnvironmentFiles != null && {
983
+ EnvironmentFiles: serializeAws_restJson1EcsEnvironmentFileList(input.EnvironmentFiles, context),
984
+ }),
985
+ ...(input.Memory != null && { Memory: input.Memory }),
986
+ ...(input.MemoryReservation != null && { MemoryReservation: input.MemoryReservation }),
987
+ ...(input.Name != null && { Name: input.Name }),
988
+ ...(input.ResourceRequirements != null && {
989
+ ResourceRequirements: serializeAws_restJson1EcsResourceRequirementsList(input.ResourceRequirements, context),
990
+ }),
991
+ };
992
+ };
993
+ const serializeAws_restJson1EcsContainerOverrideList = (input, context) => {
994
+ return input
995
+ .filter((e) => e != null)
996
+ .map((entry) => {
997
+ return serializeAws_restJson1EcsContainerOverride(entry, context);
998
+ });
999
+ };
1000
+ const serializeAws_restJson1EcsEnvironmentFile = (input, context) => {
1001
+ return {
1002
+ ...(input.type != null && { type: input.type }),
1003
+ ...(input.value != null && { value: input.value }),
1004
+ };
1005
+ };
1006
+ const serializeAws_restJson1EcsEnvironmentFileList = (input, context) => {
1007
+ return input
1008
+ .filter((e) => e != null)
1009
+ .map((entry) => {
1010
+ return serializeAws_restJson1EcsEnvironmentFile(entry, context);
1011
+ });
1012
+ };
1013
+ const serializeAws_restJson1EcsEnvironmentVariable = (input, context) => {
1014
+ return {
1015
+ ...(input.name != null && { name: input.name }),
1016
+ ...(input.value != null && { value: input.value }),
1017
+ };
1018
+ };
1019
+ const serializeAws_restJson1EcsEnvironmentVariableList = (input, context) => {
1020
+ return input
1021
+ .filter((e) => e != null)
1022
+ .map((entry) => {
1023
+ return serializeAws_restJson1EcsEnvironmentVariable(entry, context);
1024
+ });
1025
+ };
1026
+ const serializeAws_restJson1EcsEphemeralStorage = (input, context) => {
1027
+ return {
1028
+ ...(input.sizeInGiB != null && { sizeInGiB: input.sizeInGiB }),
1029
+ };
1030
+ };
1031
+ const serializeAws_restJson1EcsInferenceAcceleratorOverride = (input, context) => {
1032
+ return {
1033
+ ...(input.deviceName != null && { deviceName: input.deviceName }),
1034
+ ...(input.deviceType != null && { deviceType: input.deviceType }),
1035
+ };
1036
+ };
1037
+ const serializeAws_restJson1EcsInferenceAcceleratorOverrideList = (input, context) => {
1038
+ return input
1039
+ .filter((e) => e != null)
1040
+ .map((entry) => {
1041
+ return serializeAws_restJson1EcsInferenceAcceleratorOverride(entry, context);
1042
+ });
1043
+ };
1044
+ const serializeAws_restJson1EcsResourceRequirement = (input, context) => {
1045
+ return {
1046
+ ...(input.type != null && { type: input.type }),
1047
+ ...(input.value != null && { value: input.value }),
1048
+ };
1049
+ };
1050
+ const serializeAws_restJson1EcsResourceRequirementsList = (input, context) => {
1051
+ return input
1052
+ .filter((e) => e != null)
1053
+ .map((entry) => {
1054
+ return serializeAws_restJson1EcsResourceRequirement(entry, context);
1055
+ });
1056
+ };
1057
+ const serializeAws_restJson1EcsTaskOverride = (input, context) => {
1058
+ return {
1059
+ ...(input.ContainerOverrides != null && {
1060
+ ContainerOverrides: serializeAws_restJson1EcsContainerOverrideList(input.ContainerOverrides, context),
1061
+ }),
1062
+ ...(input.Cpu != null && { Cpu: input.Cpu }),
1063
+ ...(input.EphemeralStorage != null && {
1064
+ EphemeralStorage: serializeAws_restJson1EcsEphemeralStorage(input.EphemeralStorage, context),
1065
+ }),
1066
+ ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1067
+ ...(input.InferenceAcceleratorOverrides != null && {
1068
+ InferenceAcceleratorOverrides: serializeAws_restJson1EcsInferenceAcceleratorOverrideList(input.InferenceAcceleratorOverrides, context),
1069
+ }),
1070
+ ...(input.Memory != null && { Memory: input.Memory }),
1071
+ ...(input.TaskRoleArn != null && { TaskRoleArn: input.TaskRoleArn }),
1072
+ };
1073
+ };
1074
+ const serializeAws_restJson1EventBridgeEventResourceList = (input, context) => {
1075
+ return input
1076
+ .filter((e) => e != null)
1077
+ .map((entry) => {
1078
+ return entry;
1079
+ });
1080
+ };
1081
+ const serializeAws_restJson1Filter = (input, context) => {
1082
+ return {
1083
+ ...(input.Pattern != null && { Pattern: input.Pattern }),
1084
+ };
1085
+ };
1086
+ const serializeAws_restJson1FilterCriteria = (input, context) => {
1087
+ return {
1088
+ ...(input.Filters != null && { Filters: serializeAws_restJson1FilterList(input.Filters, context) }),
1089
+ };
1090
+ };
1091
+ const serializeAws_restJson1FilterList = (input, context) => {
1092
+ return input
1093
+ .filter((e) => e != null)
1094
+ .map((entry) => {
1095
+ return serializeAws_restJson1Filter(entry, context);
1096
+ });
1097
+ };
1098
+ const serializeAws_restJson1HeaderParametersMap = (input, context) => {
1099
+ return Object.entries(input).reduce((acc, [key, value]) => {
1100
+ if (value === null) {
1101
+ return acc;
1102
+ }
1103
+ acc[key] = value;
1104
+ return acc;
1105
+ }, {});
1106
+ };
1107
+ const serializeAws_restJson1KafkaBootstrapServers = (input, context) => {
1108
+ return input
1109
+ .filter((e) => e != null)
1110
+ .map((entry) => {
1111
+ return entry;
1112
+ });
1113
+ };
1114
+ const serializeAws_restJson1MQBrokerAccessCredentials = (input, context) => {
1115
+ return MQBrokerAccessCredentials.visit(input, {
1116
+ BasicAuth: (value) => ({ BasicAuth: value }),
1117
+ _: (name, value) => ({ name: value }),
1118
+ });
1119
+ };
1120
+ const serializeAws_restJson1MSKAccessCredentials = (input, context) => {
1121
+ return MSKAccessCredentials.visit(input, {
1122
+ ClientCertificateTlsAuth: (value) => ({ ClientCertificateTlsAuth: value }),
1123
+ SaslScram512Auth: (value) => ({ SaslScram512Auth: value }),
1124
+ _: (name, value) => ({ name: value }),
1125
+ });
1126
+ };
1127
+ const serializeAws_restJson1NetworkConfiguration = (input, context) => {
1128
+ return {
1129
+ ...(input.awsvpcConfiguration != null && {
1130
+ awsvpcConfiguration: serializeAws_restJson1AwsVpcConfiguration(input.awsvpcConfiguration, context),
1131
+ }),
1132
+ };
1133
+ };
1134
+ const serializeAws_restJson1PathParameterList = (input, context) => {
1135
+ return input
1136
+ .filter((e) => e != null)
1137
+ .map((entry) => {
1138
+ return entry;
1139
+ });
1140
+ };
1141
+ const serializeAws_restJson1PipeEnrichmentHttpParameters = (input, context) => {
1142
+ return {
1143
+ ...(input.HeaderParameters != null && {
1144
+ HeaderParameters: serializeAws_restJson1HeaderParametersMap(input.HeaderParameters, context),
1145
+ }),
1146
+ ...(input.PathParameterValues != null && {
1147
+ PathParameterValues: serializeAws_restJson1PathParameterList(input.PathParameterValues, context),
1148
+ }),
1149
+ ...(input.QueryStringParameters != null && {
1150
+ QueryStringParameters: serializeAws_restJson1QueryStringParametersMap(input.QueryStringParameters, context),
1151
+ }),
1152
+ };
1153
+ };
1154
+ const serializeAws_restJson1PipeEnrichmentParameters = (input, context) => {
1155
+ return {
1156
+ ...(input.HttpParameters != null && {
1157
+ HttpParameters: serializeAws_restJson1PipeEnrichmentHttpParameters(input.HttpParameters, context),
1158
+ }),
1159
+ ...(input.InputTemplate != null && { InputTemplate: input.InputTemplate }),
1160
+ };
1161
+ };
1162
+ const serializeAws_restJson1PipeSourceActiveMQBrokerParameters = (input, context) => {
1163
+ return {
1164
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1165
+ ...(input.Credentials != null && {
1166
+ Credentials: serializeAws_restJson1MQBrokerAccessCredentials(input.Credentials, context),
1167
+ }),
1168
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1169
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1170
+ }),
1171
+ ...(input.QueueName != null && { QueueName: input.QueueName }),
1172
+ };
1173
+ };
1174
+ const serializeAws_restJson1PipeSourceDynamoDBStreamParameters = (input, context) => {
1175
+ return {
1176
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1177
+ ...(input.DeadLetterConfig != null && {
1178
+ DeadLetterConfig: serializeAws_restJson1DeadLetterConfig(input.DeadLetterConfig, context),
1179
+ }),
1180
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1181
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1182
+ }),
1183
+ ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }),
1184
+ ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }),
1185
+ ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }),
1186
+ ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }),
1187
+ ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }),
1188
+ };
1189
+ };
1190
+ const serializeAws_restJson1PipeSourceKinesisStreamParameters = (input, context) => {
1191
+ return {
1192
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1193
+ ...(input.DeadLetterConfig != null && {
1194
+ DeadLetterConfig: serializeAws_restJson1DeadLetterConfig(input.DeadLetterConfig, context),
1195
+ }),
1196
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1197
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1198
+ }),
1199
+ ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }),
1200
+ ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }),
1201
+ ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }),
1202
+ ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }),
1203
+ ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }),
1204
+ ...(input.StartingPositionTimestamp != null && {
1205
+ StartingPositionTimestamp: Math.round(input.StartingPositionTimestamp.getTime() / 1000),
1206
+ }),
1207
+ };
1208
+ };
1209
+ const serializeAws_restJson1PipeSourceManagedStreamingKafkaParameters = (input, context) => {
1210
+ return {
1211
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1212
+ ...(input.ConsumerGroupID != null && { ConsumerGroupID: input.ConsumerGroupID }),
1213
+ ...(input.Credentials != null && {
1214
+ Credentials: serializeAws_restJson1MSKAccessCredentials(input.Credentials, context),
1215
+ }),
1216
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1217
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1218
+ }),
1219
+ ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }),
1220
+ ...(input.TopicName != null && { TopicName: input.TopicName }),
1221
+ };
1222
+ };
1223
+ const serializeAws_restJson1PipeSourceParameters = (input, context) => {
1224
+ return {
1225
+ ...(input.ActiveMQBrokerParameters != null && {
1226
+ ActiveMQBrokerParameters: serializeAws_restJson1PipeSourceActiveMQBrokerParameters(input.ActiveMQBrokerParameters, context),
1227
+ }),
1228
+ ...(input.DynamoDBStreamParameters != null && {
1229
+ DynamoDBStreamParameters: serializeAws_restJson1PipeSourceDynamoDBStreamParameters(input.DynamoDBStreamParameters, context),
1230
+ }),
1231
+ ...(input.FilterCriteria != null && {
1232
+ FilterCriteria: serializeAws_restJson1FilterCriteria(input.FilterCriteria, context),
1233
+ }),
1234
+ ...(input.KinesisStreamParameters != null && {
1235
+ KinesisStreamParameters: serializeAws_restJson1PipeSourceKinesisStreamParameters(input.KinesisStreamParameters, context),
1236
+ }),
1237
+ ...(input.ManagedStreamingKafkaParameters != null && {
1238
+ ManagedStreamingKafkaParameters: serializeAws_restJson1PipeSourceManagedStreamingKafkaParameters(input.ManagedStreamingKafkaParameters, context),
1239
+ }),
1240
+ ...(input.RabbitMQBrokerParameters != null && {
1241
+ RabbitMQBrokerParameters: serializeAws_restJson1PipeSourceRabbitMQBrokerParameters(input.RabbitMQBrokerParameters, context),
1242
+ }),
1243
+ ...(input.SelfManagedKafkaParameters != null && {
1244
+ SelfManagedKafkaParameters: serializeAws_restJson1PipeSourceSelfManagedKafkaParameters(input.SelfManagedKafkaParameters, context),
1245
+ }),
1246
+ ...(input.SqsQueueParameters != null && {
1247
+ SqsQueueParameters: serializeAws_restJson1PipeSourceSqsQueueParameters(input.SqsQueueParameters, context),
1248
+ }),
1249
+ };
1250
+ };
1251
+ const serializeAws_restJson1PipeSourceRabbitMQBrokerParameters = (input, context) => {
1252
+ return {
1253
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1254
+ ...(input.Credentials != null && {
1255
+ Credentials: serializeAws_restJson1MQBrokerAccessCredentials(input.Credentials, context),
1256
+ }),
1257
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1258
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1259
+ }),
1260
+ ...(input.QueueName != null && { QueueName: input.QueueName }),
1261
+ ...(input.VirtualHost != null && { VirtualHost: input.VirtualHost }),
1262
+ };
1263
+ };
1264
+ const serializeAws_restJson1PipeSourceSelfManagedKafkaParameters = (input, context) => {
1265
+ return {
1266
+ ...(input.AdditionalBootstrapServers != null && {
1267
+ AdditionalBootstrapServers: serializeAws_restJson1KafkaBootstrapServers(input.AdditionalBootstrapServers, context),
1268
+ }),
1269
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1270
+ ...(input.ConsumerGroupID != null && { ConsumerGroupID: input.ConsumerGroupID }),
1271
+ ...(input.Credentials != null && {
1272
+ Credentials: serializeAws_restJson1SelfManagedKafkaAccessConfigurationCredentials(input.Credentials, context),
1273
+ }),
1274
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1275
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1276
+ }),
1277
+ ...(input.ServerRootCaCertificate != null && { ServerRootCaCertificate: input.ServerRootCaCertificate }),
1278
+ ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }),
1279
+ ...(input.TopicName != null && { TopicName: input.TopicName }),
1280
+ ...(input.Vpc != null && { Vpc: serializeAws_restJson1SelfManagedKafkaAccessConfigurationVpc(input.Vpc, context) }),
1281
+ };
1282
+ };
1283
+ const serializeAws_restJson1PipeSourceSqsQueueParameters = (input, context) => {
1284
+ return {
1285
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1286
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1287
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1288
+ }),
1289
+ };
1290
+ };
1291
+ const serializeAws_restJson1PipeTargetBatchJobParameters = (input, context) => {
1292
+ return {
1293
+ ...(input.ArrayProperties != null && {
1294
+ ArrayProperties: serializeAws_restJson1BatchArrayProperties(input.ArrayProperties, context),
1295
+ }),
1296
+ ...(input.ContainerOverrides != null && {
1297
+ ContainerOverrides: serializeAws_restJson1BatchContainerOverrides(input.ContainerOverrides, context),
1298
+ }),
1299
+ ...(input.DependsOn != null && { DependsOn: serializeAws_restJson1BatchDependsOn(input.DependsOn, context) }),
1300
+ ...(input.JobDefinition != null && { JobDefinition: input.JobDefinition }),
1301
+ ...(input.JobName != null && { JobName: input.JobName }),
1302
+ ...(input.Parameters != null && {
1303
+ Parameters: serializeAws_restJson1BatchParametersMap(input.Parameters, context),
1304
+ }),
1305
+ ...(input.RetryStrategy != null && {
1306
+ RetryStrategy: serializeAws_restJson1BatchRetryStrategy(input.RetryStrategy, context),
1307
+ }),
1308
+ };
1309
+ };
1310
+ const serializeAws_restJson1PipeTargetCloudWatchLogsParameters = (input, context) => {
1311
+ return {
1312
+ ...(input.LogStreamName != null && { LogStreamName: input.LogStreamName }),
1313
+ ...(input.Timestamp != null && { Timestamp: input.Timestamp }),
1314
+ };
1315
+ };
1316
+ const serializeAws_restJson1PipeTargetEcsTaskParameters = (input, context) => {
1317
+ return {
1318
+ ...(input.CapacityProviderStrategy != null && {
1319
+ CapacityProviderStrategy: serializeAws_restJson1CapacityProviderStrategy(input.CapacityProviderStrategy, context),
1320
+ }),
1321
+ ...(input.EnableECSManagedTags != null && { EnableECSManagedTags: input.EnableECSManagedTags }),
1322
+ ...(input.EnableExecuteCommand != null && { EnableExecuteCommand: input.EnableExecuteCommand }),
1323
+ ...(input.Group != null && { Group: input.Group }),
1324
+ ...(input.LaunchType != null && { LaunchType: input.LaunchType }),
1325
+ ...(input.NetworkConfiguration != null && {
1326
+ NetworkConfiguration: serializeAws_restJson1NetworkConfiguration(input.NetworkConfiguration, context),
1327
+ }),
1328
+ ...(input.Overrides != null && { Overrides: serializeAws_restJson1EcsTaskOverride(input.Overrides, context) }),
1329
+ ...(input.PlacementConstraints != null && {
1330
+ PlacementConstraints: serializeAws_restJson1PlacementConstraints(input.PlacementConstraints, context),
1331
+ }),
1332
+ ...(input.PlacementStrategy != null && {
1333
+ PlacementStrategy: serializeAws_restJson1PlacementStrategies(input.PlacementStrategy, context),
1334
+ }),
1335
+ ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }),
1336
+ ...(input.PropagateTags != null && { PropagateTags: input.PropagateTags }),
1337
+ ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }),
1338
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1339
+ ...(input.TaskCount != null && { TaskCount: input.TaskCount }),
1340
+ ...(input.TaskDefinitionArn != null && { TaskDefinitionArn: input.TaskDefinitionArn }),
1341
+ };
1342
+ };
1343
+ const serializeAws_restJson1PipeTargetEventBridgeEventBusParameters = (input, context) => {
1344
+ return {
1345
+ ...(input.DetailType != null && { DetailType: input.DetailType }),
1346
+ ...(input.EndpointId != null && { EndpointId: input.EndpointId }),
1347
+ ...(input.Resources != null && {
1348
+ Resources: serializeAws_restJson1EventBridgeEventResourceList(input.Resources, context),
1349
+ }),
1350
+ ...(input.Source != null && { Source: input.Source }),
1351
+ ...(input.Time != null && { Time: input.Time }),
1352
+ };
1353
+ };
1354
+ const serializeAws_restJson1PipeTargetHttpParameters = (input, context) => {
1355
+ return {
1356
+ ...(input.HeaderParameters != null && {
1357
+ HeaderParameters: serializeAws_restJson1HeaderParametersMap(input.HeaderParameters, context),
1358
+ }),
1359
+ ...(input.PathParameterValues != null && {
1360
+ PathParameterValues: serializeAws_restJson1PathParameterList(input.PathParameterValues, context),
1361
+ }),
1362
+ ...(input.QueryStringParameters != null && {
1363
+ QueryStringParameters: serializeAws_restJson1QueryStringParametersMap(input.QueryStringParameters, context),
1364
+ }),
1365
+ };
1366
+ };
1367
+ const serializeAws_restJson1PipeTargetKinesisStreamParameters = (input, context) => {
1368
+ return {
1369
+ ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }),
1370
+ };
1371
+ };
1372
+ const serializeAws_restJson1PipeTargetLambdaFunctionParameters = (input, context) => {
1373
+ return {
1374
+ ...(input.InvocationType != null && { InvocationType: input.InvocationType }),
1375
+ };
1376
+ };
1377
+ const serializeAws_restJson1PipeTargetParameters = (input, context) => {
1378
+ return {
1379
+ ...(input.BatchJobParameters != null && {
1380
+ BatchJobParameters: serializeAws_restJson1PipeTargetBatchJobParameters(input.BatchJobParameters, context),
1381
+ }),
1382
+ ...(input.CloudWatchLogsParameters != null && {
1383
+ CloudWatchLogsParameters: serializeAws_restJson1PipeTargetCloudWatchLogsParameters(input.CloudWatchLogsParameters, context),
1384
+ }),
1385
+ ...(input.EcsTaskParameters != null && {
1386
+ EcsTaskParameters: serializeAws_restJson1PipeTargetEcsTaskParameters(input.EcsTaskParameters, context),
1387
+ }),
1388
+ ...(input.EventBridgeEventBusParameters != null && {
1389
+ EventBridgeEventBusParameters: serializeAws_restJson1PipeTargetEventBridgeEventBusParameters(input.EventBridgeEventBusParameters, context),
1390
+ }),
1391
+ ...(input.HttpParameters != null && {
1392
+ HttpParameters: serializeAws_restJson1PipeTargetHttpParameters(input.HttpParameters, context),
1393
+ }),
1394
+ ...(input.InputTemplate != null && { InputTemplate: input.InputTemplate }),
1395
+ ...(input.KinesisStreamParameters != null && {
1396
+ KinesisStreamParameters: serializeAws_restJson1PipeTargetKinesisStreamParameters(input.KinesisStreamParameters, context),
1397
+ }),
1398
+ ...(input.LambdaFunctionParameters != null && {
1399
+ LambdaFunctionParameters: serializeAws_restJson1PipeTargetLambdaFunctionParameters(input.LambdaFunctionParameters, context),
1400
+ }),
1401
+ ...(input.RedshiftDataParameters != null && {
1402
+ RedshiftDataParameters: serializeAws_restJson1PipeTargetRedshiftDataParameters(input.RedshiftDataParameters, context),
1403
+ }),
1404
+ ...(input.SageMakerPipelineParameters != null && {
1405
+ SageMakerPipelineParameters: serializeAws_restJson1PipeTargetSageMakerPipelineParameters(input.SageMakerPipelineParameters, context),
1406
+ }),
1407
+ ...(input.SqsQueueParameters != null && {
1408
+ SqsQueueParameters: serializeAws_restJson1PipeTargetSqsQueueParameters(input.SqsQueueParameters, context),
1409
+ }),
1410
+ ...(input.StepFunctionStateMachineParameters != null && {
1411
+ StepFunctionStateMachineParameters: serializeAws_restJson1PipeTargetStateMachineParameters(input.StepFunctionStateMachineParameters, context),
1412
+ }),
1413
+ };
1414
+ };
1415
+ const serializeAws_restJson1PipeTargetRedshiftDataParameters = (input, context) => {
1416
+ return {
1417
+ ...(input.Database != null && { Database: input.Database }),
1418
+ ...(input.DbUser != null && { DbUser: input.DbUser }),
1419
+ ...(input.SecretManagerArn != null && { SecretManagerArn: input.SecretManagerArn }),
1420
+ ...(input.Sqls != null && { Sqls: serializeAws_restJson1Sqls(input.Sqls, context) }),
1421
+ ...(input.StatementName != null && { StatementName: input.StatementName }),
1422
+ ...(input.WithEvent != null && { WithEvent: input.WithEvent }),
1423
+ };
1424
+ };
1425
+ const serializeAws_restJson1PipeTargetSageMakerPipelineParameters = (input, context) => {
1426
+ return {
1427
+ ...(input.PipelineParameterList != null && {
1428
+ PipelineParameterList: serializeAws_restJson1SageMakerPipelineParameterList(input.PipelineParameterList, context),
1429
+ }),
1430
+ };
1431
+ };
1432
+ const serializeAws_restJson1PipeTargetSqsQueueParameters = (input, context) => {
1433
+ return {
1434
+ ...(input.MessageDeduplicationId != null && { MessageDeduplicationId: input.MessageDeduplicationId }),
1435
+ ...(input.MessageGroupId != null && { MessageGroupId: input.MessageGroupId }),
1436
+ };
1437
+ };
1438
+ const serializeAws_restJson1PipeTargetStateMachineParameters = (input, context) => {
1439
+ return {
1440
+ ...(input.InvocationType != null && { InvocationType: input.InvocationType }),
1441
+ };
1442
+ };
1443
+ const serializeAws_restJson1PlacementConstraint = (input, context) => {
1444
+ return {
1445
+ ...(input.expression != null && { expression: input.expression }),
1446
+ ...(input.type != null && { type: input.type }),
1447
+ };
1448
+ };
1449
+ const serializeAws_restJson1PlacementConstraints = (input, context) => {
1450
+ return input
1451
+ .filter((e) => e != null)
1452
+ .map((entry) => {
1453
+ return serializeAws_restJson1PlacementConstraint(entry, context);
1454
+ });
1455
+ };
1456
+ const serializeAws_restJson1PlacementStrategies = (input, context) => {
1457
+ return input
1458
+ .filter((e) => e != null)
1459
+ .map((entry) => {
1460
+ return serializeAws_restJson1PlacementStrategy(entry, context);
1461
+ });
1462
+ };
1463
+ const serializeAws_restJson1PlacementStrategy = (input, context) => {
1464
+ return {
1465
+ ...(input.field != null && { field: input.field }),
1466
+ ...(input.type != null && { type: input.type }),
1467
+ };
1468
+ };
1469
+ const serializeAws_restJson1QueryStringParametersMap = (input, context) => {
1470
+ return Object.entries(input).reduce((acc, [key, value]) => {
1471
+ if (value === null) {
1472
+ return acc;
1473
+ }
1474
+ acc[key] = value;
1475
+ return acc;
1476
+ }, {});
1477
+ };
1478
+ const serializeAws_restJson1SageMakerPipelineParameter = (input, context) => {
1479
+ return {
1480
+ ...(input.Name != null && { Name: input.Name }),
1481
+ ...(input.Value != null && { Value: input.Value }),
1482
+ };
1483
+ };
1484
+ const serializeAws_restJson1SageMakerPipelineParameterList = (input, context) => {
1485
+ return input
1486
+ .filter((e) => e != null)
1487
+ .map((entry) => {
1488
+ return serializeAws_restJson1SageMakerPipelineParameter(entry, context);
1489
+ });
1490
+ };
1491
+ const serializeAws_restJson1SecurityGroupIds = (input, context) => {
1492
+ return input
1493
+ .filter((e) => e != null)
1494
+ .map((entry) => {
1495
+ return entry;
1496
+ });
1497
+ };
1498
+ const serializeAws_restJson1SecurityGroups = (input, context) => {
1499
+ return input
1500
+ .filter((e) => e != null)
1501
+ .map((entry) => {
1502
+ return entry;
1503
+ });
1504
+ };
1505
+ const serializeAws_restJson1SelfManagedKafkaAccessConfigurationCredentials = (input, context) => {
1506
+ return SelfManagedKafkaAccessConfigurationCredentials.visit(input, {
1507
+ BasicAuth: (value) => ({ BasicAuth: value }),
1508
+ ClientCertificateTlsAuth: (value) => ({ ClientCertificateTlsAuth: value }),
1509
+ SaslScram256Auth: (value) => ({ SaslScram256Auth: value }),
1510
+ SaslScram512Auth: (value) => ({ SaslScram512Auth: value }),
1511
+ _: (name, value) => ({ name: value }),
1512
+ });
1513
+ };
1514
+ const serializeAws_restJson1SelfManagedKafkaAccessConfigurationVpc = (input, context) => {
1515
+ return {
1516
+ ...(input.SecurityGroup != null && {
1517
+ SecurityGroup: serializeAws_restJson1SecurityGroupIds(input.SecurityGroup, context),
1518
+ }),
1519
+ ...(input.Subnets != null && { Subnets: serializeAws_restJson1SubnetIds(input.Subnets, context) }),
1520
+ };
1521
+ };
1522
+ const serializeAws_restJson1Sqls = (input, context) => {
1523
+ return input
1524
+ .filter((e) => e != null)
1525
+ .map((entry) => {
1526
+ return entry;
1527
+ });
1528
+ };
1529
+ const serializeAws_restJson1StringList = (input, context) => {
1530
+ return input
1531
+ .filter((e) => e != null)
1532
+ .map((entry) => {
1533
+ return entry;
1534
+ });
1535
+ };
1536
+ const serializeAws_restJson1SubnetIds = (input, context) => {
1537
+ return input
1538
+ .filter((e) => e != null)
1539
+ .map((entry) => {
1540
+ return entry;
1541
+ });
1542
+ };
1543
+ const serializeAws_restJson1Subnets = (input, context) => {
1544
+ return input
1545
+ .filter((e) => e != null)
1546
+ .map((entry) => {
1547
+ return entry;
1548
+ });
1549
+ };
1550
+ const serializeAws_restJson1Tag = (input, context) => {
1551
+ return {
1552
+ ...(input.Key != null && { Key: input.Key }),
1553
+ ...(input.Value != null && { Value: input.Value }),
1554
+ };
1555
+ };
1556
+ const serializeAws_restJson1TagList = (input, context) => {
1557
+ return input
1558
+ .filter((e) => e != null)
1559
+ .map((entry) => {
1560
+ return serializeAws_restJson1Tag(entry, context);
1561
+ });
1562
+ };
1563
+ const serializeAws_restJson1TagMap = (input, context) => {
1564
+ return Object.entries(input).reduce((acc, [key, value]) => {
1565
+ if (value === null) {
1566
+ return acc;
1567
+ }
1568
+ acc[key] = value;
1569
+ return acc;
1570
+ }, {});
1571
+ };
1572
+ const serializeAws_restJson1UpdatePipeSourceActiveMQBrokerParameters = (input, context) => {
1573
+ return {
1574
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1575
+ ...(input.Credentials != null && {
1576
+ Credentials: serializeAws_restJson1MQBrokerAccessCredentials(input.Credentials, context),
1577
+ }),
1578
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1579
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1580
+ }),
1581
+ };
1582
+ };
1583
+ const serializeAws_restJson1UpdatePipeSourceDynamoDBStreamParameters = (input, context) => {
1584
+ return {
1585
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1586
+ ...(input.DeadLetterConfig != null && {
1587
+ DeadLetterConfig: serializeAws_restJson1DeadLetterConfig(input.DeadLetterConfig, context),
1588
+ }),
1589
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1590
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1591
+ }),
1592
+ ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }),
1593
+ ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }),
1594
+ ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }),
1595
+ ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }),
1596
+ };
1597
+ };
1598
+ const serializeAws_restJson1UpdatePipeSourceKinesisStreamParameters = (input, context) => {
1599
+ return {
1600
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1601
+ ...(input.DeadLetterConfig != null && {
1602
+ DeadLetterConfig: serializeAws_restJson1DeadLetterConfig(input.DeadLetterConfig, context),
1603
+ }),
1604
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1605
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1606
+ }),
1607
+ ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }),
1608
+ ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }),
1609
+ ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }),
1610
+ ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }),
1611
+ };
1612
+ };
1613
+ const serializeAws_restJson1UpdatePipeSourceManagedStreamingKafkaParameters = (input, context) => {
1614
+ return {
1615
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1616
+ ...(input.Credentials != null && {
1617
+ Credentials: serializeAws_restJson1MSKAccessCredentials(input.Credentials, context),
1618
+ }),
1619
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1620
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1621
+ }),
1622
+ };
1623
+ };
1624
+ const serializeAws_restJson1UpdatePipeSourceParameters = (input, context) => {
1625
+ return {
1626
+ ...(input.ActiveMQBrokerParameters != null && {
1627
+ ActiveMQBrokerParameters: serializeAws_restJson1UpdatePipeSourceActiveMQBrokerParameters(input.ActiveMQBrokerParameters, context),
1628
+ }),
1629
+ ...(input.DynamoDBStreamParameters != null && {
1630
+ DynamoDBStreamParameters: serializeAws_restJson1UpdatePipeSourceDynamoDBStreamParameters(input.DynamoDBStreamParameters, context),
1631
+ }),
1632
+ ...(input.FilterCriteria != null && {
1633
+ FilterCriteria: serializeAws_restJson1FilterCriteria(input.FilterCriteria, context),
1634
+ }),
1635
+ ...(input.KinesisStreamParameters != null && {
1636
+ KinesisStreamParameters: serializeAws_restJson1UpdatePipeSourceKinesisStreamParameters(input.KinesisStreamParameters, context),
1637
+ }),
1638
+ ...(input.ManagedStreamingKafkaParameters != null && {
1639
+ ManagedStreamingKafkaParameters: serializeAws_restJson1UpdatePipeSourceManagedStreamingKafkaParameters(input.ManagedStreamingKafkaParameters, context),
1640
+ }),
1641
+ ...(input.RabbitMQBrokerParameters != null && {
1642
+ RabbitMQBrokerParameters: serializeAws_restJson1UpdatePipeSourceRabbitMQBrokerParameters(input.RabbitMQBrokerParameters, context),
1643
+ }),
1644
+ ...(input.SelfManagedKafkaParameters != null && {
1645
+ SelfManagedKafkaParameters: serializeAws_restJson1UpdatePipeSourceSelfManagedKafkaParameters(input.SelfManagedKafkaParameters, context),
1646
+ }),
1647
+ ...(input.SqsQueueParameters != null && {
1648
+ SqsQueueParameters: serializeAws_restJson1UpdatePipeSourceSqsQueueParameters(input.SqsQueueParameters, context),
1649
+ }),
1650
+ };
1651
+ };
1652
+ const serializeAws_restJson1UpdatePipeSourceRabbitMQBrokerParameters = (input, context) => {
1653
+ return {
1654
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1655
+ ...(input.Credentials != null && {
1656
+ Credentials: serializeAws_restJson1MQBrokerAccessCredentials(input.Credentials, context),
1657
+ }),
1658
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1659
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1660
+ }),
1661
+ };
1662
+ };
1663
+ const serializeAws_restJson1UpdatePipeSourceSelfManagedKafkaParameters = (input, context) => {
1664
+ return {
1665
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1666
+ ...(input.Credentials != null && {
1667
+ Credentials: serializeAws_restJson1SelfManagedKafkaAccessConfigurationCredentials(input.Credentials, context),
1668
+ }),
1669
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1670
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1671
+ }),
1672
+ ...(input.ServerRootCaCertificate != null && { ServerRootCaCertificate: input.ServerRootCaCertificate }),
1673
+ ...(input.Vpc != null && { Vpc: serializeAws_restJson1SelfManagedKafkaAccessConfigurationVpc(input.Vpc, context) }),
1674
+ };
1675
+ };
1676
+ const serializeAws_restJson1UpdatePipeSourceSqsQueueParameters = (input, context) => {
1677
+ return {
1678
+ ...(input.BatchSize != null && { BatchSize: input.BatchSize }),
1679
+ ...(input.MaximumBatchingWindowInSeconds != null && {
1680
+ MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds,
1681
+ }),
1682
+ };
1683
+ };
1684
+ const deserializeAws_restJson1AwsVpcConfiguration = (output, context) => {
1685
+ return {
1686
+ AssignPublicIp: __expectString(output.AssignPublicIp),
1687
+ SecurityGroups: output.SecurityGroups != null
1688
+ ? deserializeAws_restJson1SecurityGroups(output.SecurityGroups, context)
1689
+ : undefined,
1690
+ Subnets: output.Subnets != null ? deserializeAws_restJson1Subnets(output.Subnets, context) : undefined,
1691
+ };
1692
+ };
1693
+ const deserializeAws_restJson1BatchArrayProperties = (output, context) => {
1694
+ return {
1695
+ Size: __expectInt32(output.Size),
1696
+ };
1697
+ };
1698
+ const deserializeAws_restJson1BatchContainerOverrides = (output, context) => {
1699
+ return {
1700
+ Command: output.Command != null ? deserializeAws_restJson1StringList(output.Command, context) : undefined,
1701
+ Environment: output.Environment != null
1702
+ ? deserializeAws_restJson1BatchEnvironmentVariableList(output.Environment, context)
1703
+ : undefined,
1704
+ InstanceType: __expectString(output.InstanceType),
1705
+ ResourceRequirements: output.ResourceRequirements != null
1706
+ ? deserializeAws_restJson1BatchResourceRequirementsList(output.ResourceRequirements, context)
1707
+ : undefined,
1708
+ };
1709
+ };
1710
+ const deserializeAws_restJson1BatchDependsOn = (output, context) => {
1711
+ const retVal = (output || [])
1712
+ .filter((e) => e != null)
1713
+ .map((entry) => {
1714
+ if (entry === null) {
1715
+ return null;
1716
+ }
1717
+ return deserializeAws_restJson1BatchJobDependency(entry, context);
1718
+ });
1719
+ return retVal;
1720
+ };
1721
+ const deserializeAws_restJson1BatchEnvironmentVariable = (output, context) => {
1722
+ return {
1723
+ Name: __expectString(output.Name),
1724
+ Value: __expectString(output.Value),
1725
+ };
1726
+ };
1727
+ const deserializeAws_restJson1BatchEnvironmentVariableList = (output, context) => {
1728
+ const retVal = (output || [])
1729
+ .filter((e) => e != null)
1730
+ .map((entry) => {
1731
+ if (entry === null) {
1732
+ return null;
1733
+ }
1734
+ return deserializeAws_restJson1BatchEnvironmentVariable(entry, context);
1735
+ });
1736
+ return retVal;
1737
+ };
1738
+ const deserializeAws_restJson1BatchJobDependency = (output, context) => {
1739
+ return {
1740
+ JobId: __expectString(output.JobId),
1741
+ Type: __expectString(output.Type),
1742
+ };
1743
+ };
1744
+ const deserializeAws_restJson1BatchParametersMap = (output, context) => {
1745
+ return Object.entries(output).reduce((acc, [key, value]) => {
1746
+ if (value === null) {
1747
+ return acc;
1748
+ }
1749
+ acc[key] = __expectString(value);
1750
+ return acc;
1751
+ }, {});
1752
+ };
1753
+ const deserializeAws_restJson1BatchResourceRequirement = (output, context) => {
1754
+ return {
1755
+ Type: __expectString(output.Type),
1756
+ Value: __expectString(output.Value),
1757
+ };
1758
+ };
1759
+ const deserializeAws_restJson1BatchResourceRequirementsList = (output, context) => {
1760
+ const retVal = (output || [])
1761
+ .filter((e) => e != null)
1762
+ .map((entry) => {
1763
+ if (entry === null) {
1764
+ return null;
1765
+ }
1766
+ return deserializeAws_restJson1BatchResourceRequirement(entry, context);
1767
+ });
1768
+ return retVal;
1769
+ };
1770
+ const deserializeAws_restJson1BatchRetryStrategy = (output, context) => {
1771
+ return {
1772
+ Attempts: __expectInt32(output.Attempts),
1773
+ };
1774
+ };
1775
+ const deserializeAws_restJson1CapacityProviderStrategy = (output, context) => {
1776
+ const retVal = (output || [])
1777
+ .filter((e) => e != null)
1778
+ .map((entry) => {
1779
+ if (entry === null) {
1780
+ return null;
1781
+ }
1782
+ return deserializeAws_restJson1CapacityProviderStrategyItem(entry, context);
1783
+ });
1784
+ return retVal;
1785
+ };
1786
+ const deserializeAws_restJson1CapacityProviderStrategyItem = (output, context) => {
1787
+ return {
1788
+ base: __expectInt32(output.base),
1789
+ capacityProvider: __expectString(output.capacityProvider),
1790
+ weight: __expectInt32(output.weight),
1791
+ };
1792
+ };
1793
+ const deserializeAws_restJson1DeadLetterConfig = (output, context) => {
1794
+ return {
1795
+ Arn: __expectString(output.Arn),
1796
+ };
1797
+ };
1798
+ const deserializeAws_restJson1EcsContainerOverride = (output, context) => {
1799
+ return {
1800
+ Command: output.Command != null ? deserializeAws_restJson1StringList(output.Command, context) : undefined,
1801
+ Cpu: __expectInt32(output.Cpu),
1802
+ Environment: output.Environment != null
1803
+ ? deserializeAws_restJson1EcsEnvironmentVariableList(output.Environment, context)
1804
+ : undefined,
1805
+ EnvironmentFiles: output.EnvironmentFiles != null
1806
+ ? deserializeAws_restJson1EcsEnvironmentFileList(output.EnvironmentFiles, context)
1807
+ : undefined,
1808
+ Memory: __expectInt32(output.Memory),
1809
+ MemoryReservation: __expectInt32(output.MemoryReservation),
1810
+ Name: __expectString(output.Name),
1811
+ ResourceRequirements: output.ResourceRequirements != null
1812
+ ? deserializeAws_restJson1EcsResourceRequirementsList(output.ResourceRequirements, context)
1813
+ : undefined,
1814
+ };
1815
+ };
1816
+ const deserializeAws_restJson1EcsContainerOverrideList = (output, context) => {
1817
+ const retVal = (output || [])
1818
+ .filter((e) => e != null)
1819
+ .map((entry) => {
1820
+ if (entry === null) {
1821
+ return null;
1822
+ }
1823
+ return deserializeAws_restJson1EcsContainerOverride(entry, context);
1824
+ });
1825
+ return retVal;
1826
+ };
1827
+ const deserializeAws_restJson1EcsEnvironmentFile = (output, context) => {
1828
+ return {
1829
+ type: __expectString(output.type),
1830
+ value: __expectString(output.value),
1831
+ };
1832
+ };
1833
+ const deserializeAws_restJson1EcsEnvironmentFileList = (output, context) => {
1834
+ const retVal = (output || [])
1835
+ .filter((e) => e != null)
1836
+ .map((entry) => {
1837
+ if (entry === null) {
1838
+ return null;
1839
+ }
1840
+ return deserializeAws_restJson1EcsEnvironmentFile(entry, context);
1841
+ });
1842
+ return retVal;
1843
+ };
1844
+ const deserializeAws_restJson1EcsEnvironmentVariable = (output, context) => {
1845
+ return {
1846
+ name: __expectString(output.name),
1847
+ value: __expectString(output.value),
1848
+ };
1849
+ };
1850
+ const deserializeAws_restJson1EcsEnvironmentVariableList = (output, context) => {
1851
+ const retVal = (output || [])
1852
+ .filter((e) => e != null)
1853
+ .map((entry) => {
1854
+ if (entry === null) {
1855
+ return null;
1856
+ }
1857
+ return deserializeAws_restJson1EcsEnvironmentVariable(entry, context);
1858
+ });
1859
+ return retVal;
1860
+ };
1861
+ const deserializeAws_restJson1EcsEphemeralStorage = (output, context) => {
1862
+ return {
1863
+ sizeInGiB: __expectInt32(output.sizeInGiB),
1864
+ };
1865
+ };
1866
+ const deserializeAws_restJson1EcsInferenceAcceleratorOverride = (output, context) => {
1867
+ return {
1868
+ deviceName: __expectString(output.deviceName),
1869
+ deviceType: __expectString(output.deviceType),
1870
+ };
1871
+ };
1872
+ const deserializeAws_restJson1EcsInferenceAcceleratorOverrideList = (output, context) => {
1873
+ const retVal = (output || [])
1874
+ .filter((e) => e != null)
1875
+ .map((entry) => {
1876
+ if (entry === null) {
1877
+ return null;
1878
+ }
1879
+ return deserializeAws_restJson1EcsInferenceAcceleratorOverride(entry, context);
1880
+ });
1881
+ return retVal;
1882
+ };
1883
+ const deserializeAws_restJson1EcsResourceRequirement = (output, context) => {
1884
+ return {
1885
+ type: __expectString(output.type),
1886
+ value: __expectString(output.value),
1887
+ };
1888
+ };
1889
+ const deserializeAws_restJson1EcsResourceRequirementsList = (output, context) => {
1890
+ const retVal = (output || [])
1891
+ .filter((e) => e != null)
1892
+ .map((entry) => {
1893
+ if (entry === null) {
1894
+ return null;
1895
+ }
1896
+ return deserializeAws_restJson1EcsResourceRequirement(entry, context);
1897
+ });
1898
+ return retVal;
1899
+ };
1900
+ const deserializeAws_restJson1EcsTaskOverride = (output, context) => {
1901
+ return {
1902
+ ContainerOverrides: output.ContainerOverrides != null
1903
+ ? deserializeAws_restJson1EcsContainerOverrideList(output.ContainerOverrides, context)
1904
+ : undefined,
1905
+ Cpu: __expectString(output.Cpu),
1906
+ EphemeralStorage: output.EphemeralStorage != null
1907
+ ? deserializeAws_restJson1EcsEphemeralStorage(output.EphemeralStorage, context)
1908
+ : undefined,
1909
+ ExecutionRoleArn: __expectString(output.ExecutionRoleArn),
1910
+ InferenceAcceleratorOverrides: output.InferenceAcceleratorOverrides != null
1911
+ ? deserializeAws_restJson1EcsInferenceAcceleratorOverrideList(output.InferenceAcceleratorOverrides, context)
1912
+ : undefined,
1913
+ Memory: __expectString(output.Memory),
1914
+ TaskRoleArn: __expectString(output.TaskRoleArn),
1915
+ };
1916
+ };
1917
+ const deserializeAws_restJson1EventBridgeEventResourceList = (output, context) => {
1918
+ const retVal = (output || [])
1919
+ .filter((e) => e != null)
1920
+ .map((entry) => {
1921
+ if (entry === null) {
1922
+ return null;
1923
+ }
1924
+ return __expectString(entry);
1925
+ });
1926
+ return retVal;
1927
+ };
1928
+ const deserializeAws_restJson1Filter = (output, context) => {
1929
+ return {
1930
+ Pattern: __expectString(output.Pattern),
1931
+ };
1932
+ };
1933
+ const deserializeAws_restJson1FilterCriteria = (output, context) => {
1934
+ return {
1935
+ Filters: output.Filters != null ? deserializeAws_restJson1FilterList(output.Filters, context) : undefined,
1936
+ };
1937
+ };
1938
+ const deserializeAws_restJson1FilterList = (output, context) => {
1939
+ const retVal = (output || [])
1940
+ .filter((e) => e != null)
1941
+ .map((entry) => {
1942
+ if (entry === null) {
1943
+ return null;
1944
+ }
1945
+ return deserializeAws_restJson1Filter(entry, context);
1946
+ });
1947
+ return retVal;
1948
+ };
1949
+ const deserializeAws_restJson1HeaderParametersMap = (output, context) => {
1950
+ return Object.entries(output).reduce((acc, [key, value]) => {
1951
+ if (value === null) {
1952
+ return acc;
1953
+ }
1954
+ acc[key] = __expectString(value);
1955
+ return acc;
1956
+ }, {});
1957
+ };
1958
+ const deserializeAws_restJson1KafkaBootstrapServers = (output, context) => {
1959
+ const retVal = (output || [])
1960
+ .filter((e) => e != null)
1961
+ .map((entry) => {
1962
+ if (entry === null) {
1963
+ return null;
1964
+ }
1965
+ return __expectString(entry);
1966
+ });
1967
+ return retVal;
1968
+ };
1969
+ const deserializeAws_restJson1MQBrokerAccessCredentials = (output, context) => {
1970
+ if (__expectString(output.BasicAuth) !== undefined) {
1971
+ return { BasicAuth: __expectString(output.BasicAuth) };
1972
+ }
1973
+ return { $unknown: Object.entries(output)[0] };
1974
+ };
1975
+ const deserializeAws_restJson1MSKAccessCredentials = (output, context) => {
1976
+ if (__expectString(output.ClientCertificateTlsAuth) !== undefined) {
1977
+ return { ClientCertificateTlsAuth: __expectString(output.ClientCertificateTlsAuth) };
1978
+ }
1979
+ if (__expectString(output.SaslScram512Auth) !== undefined) {
1980
+ return { SaslScram512Auth: __expectString(output.SaslScram512Auth) };
1981
+ }
1982
+ return { $unknown: Object.entries(output)[0] };
1983
+ };
1984
+ const deserializeAws_restJson1NetworkConfiguration = (output, context) => {
1985
+ return {
1986
+ awsvpcConfiguration: output.awsvpcConfiguration != null
1987
+ ? deserializeAws_restJson1AwsVpcConfiguration(output.awsvpcConfiguration, context)
1988
+ : undefined,
1989
+ };
1990
+ };
1991
+ const deserializeAws_restJson1PathParameterList = (output, context) => {
1992
+ const retVal = (output || [])
1993
+ .filter((e) => e != null)
1994
+ .map((entry) => {
1995
+ if (entry === null) {
1996
+ return null;
1997
+ }
1998
+ return __expectString(entry);
1999
+ });
2000
+ return retVal;
2001
+ };
2002
+ const deserializeAws_restJson1Pipe = (output, context) => {
2003
+ return {
2004
+ Arn: __expectString(output.Arn),
2005
+ CreationTime: output.CreationTime != null
2006
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
2007
+ : undefined,
2008
+ CurrentState: __expectString(output.CurrentState),
2009
+ DesiredState: __expectString(output.DesiredState),
2010
+ Enrichment: __expectString(output.Enrichment),
2011
+ LastModifiedTime: output.LastModifiedTime != null
2012
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
2013
+ : undefined,
2014
+ Name: __expectString(output.Name),
2015
+ Source: __expectString(output.Source),
2016
+ StateReason: __expectString(output.StateReason),
2017
+ Target: __expectString(output.Target),
2018
+ };
2019
+ };
2020
+ const deserializeAws_restJson1PipeEnrichmentHttpParameters = (output, context) => {
2021
+ return {
2022
+ HeaderParameters: output.HeaderParameters != null
2023
+ ? deserializeAws_restJson1HeaderParametersMap(output.HeaderParameters, context)
2024
+ : undefined,
2025
+ PathParameterValues: output.PathParameterValues != null
2026
+ ? deserializeAws_restJson1PathParameterList(output.PathParameterValues, context)
2027
+ : undefined,
2028
+ QueryStringParameters: output.QueryStringParameters != null
2029
+ ? deserializeAws_restJson1QueryStringParametersMap(output.QueryStringParameters, context)
2030
+ : undefined,
2031
+ };
2032
+ };
2033
+ const deserializeAws_restJson1PipeEnrichmentParameters = (output, context) => {
2034
+ return {
2035
+ HttpParameters: output.HttpParameters != null
2036
+ ? deserializeAws_restJson1PipeEnrichmentHttpParameters(output.HttpParameters, context)
2037
+ : undefined,
2038
+ InputTemplate: __expectString(output.InputTemplate),
2039
+ };
2040
+ };
2041
+ const deserializeAws_restJson1PipeList = (output, context) => {
2042
+ const retVal = (output || [])
2043
+ .filter((e) => e != null)
2044
+ .map((entry) => {
2045
+ if (entry === null) {
2046
+ return null;
2047
+ }
2048
+ return deserializeAws_restJson1Pipe(entry, context);
2049
+ });
2050
+ return retVal;
2051
+ };
2052
+ const deserializeAws_restJson1PipeSourceActiveMQBrokerParameters = (output, context) => {
2053
+ return {
2054
+ BatchSize: __expectInt32(output.BatchSize),
2055
+ Credentials: output.Credentials != null
2056
+ ? deserializeAws_restJson1MQBrokerAccessCredentials(__expectUnion(output.Credentials), context)
2057
+ : undefined,
2058
+ MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds),
2059
+ QueueName: __expectString(output.QueueName),
2060
+ };
2061
+ };
2062
+ const deserializeAws_restJson1PipeSourceDynamoDBStreamParameters = (output, context) => {
2063
+ return {
2064
+ BatchSize: __expectInt32(output.BatchSize),
2065
+ DeadLetterConfig: output.DeadLetterConfig != null
2066
+ ? deserializeAws_restJson1DeadLetterConfig(output.DeadLetterConfig, context)
2067
+ : undefined,
2068
+ MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds),
2069
+ MaximumRecordAgeInSeconds: __expectInt32(output.MaximumRecordAgeInSeconds),
2070
+ MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts),
2071
+ OnPartialBatchItemFailure: __expectString(output.OnPartialBatchItemFailure),
2072
+ ParallelizationFactor: __expectInt32(output.ParallelizationFactor),
2073
+ StartingPosition: __expectString(output.StartingPosition),
2074
+ };
2075
+ };
2076
+ const deserializeAws_restJson1PipeSourceKinesisStreamParameters = (output, context) => {
2077
+ return {
2078
+ BatchSize: __expectInt32(output.BatchSize),
2079
+ DeadLetterConfig: output.DeadLetterConfig != null
2080
+ ? deserializeAws_restJson1DeadLetterConfig(output.DeadLetterConfig, context)
2081
+ : undefined,
2082
+ MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds),
2083
+ MaximumRecordAgeInSeconds: __expectInt32(output.MaximumRecordAgeInSeconds),
2084
+ MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts),
2085
+ OnPartialBatchItemFailure: __expectString(output.OnPartialBatchItemFailure),
2086
+ ParallelizationFactor: __expectInt32(output.ParallelizationFactor),
2087
+ StartingPosition: __expectString(output.StartingPosition),
2088
+ StartingPositionTimestamp: output.StartingPositionTimestamp != null
2089
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartingPositionTimestamp)))
2090
+ : undefined,
2091
+ };
2092
+ };
2093
+ const deserializeAws_restJson1PipeSourceManagedStreamingKafkaParameters = (output, context) => {
2094
+ return {
2095
+ BatchSize: __expectInt32(output.BatchSize),
2096
+ ConsumerGroupID: __expectString(output.ConsumerGroupID),
2097
+ Credentials: output.Credentials != null
2098
+ ? deserializeAws_restJson1MSKAccessCredentials(__expectUnion(output.Credentials), context)
2099
+ : undefined,
2100
+ MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds),
2101
+ StartingPosition: __expectString(output.StartingPosition),
2102
+ TopicName: __expectString(output.TopicName),
2103
+ };
2104
+ };
2105
+ const deserializeAws_restJson1PipeSourceParameters = (output, context) => {
2106
+ return {
2107
+ ActiveMQBrokerParameters: output.ActiveMQBrokerParameters != null
2108
+ ? deserializeAws_restJson1PipeSourceActiveMQBrokerParameters(output.ActiveMQBrokerParameters, context)
2109
+ : undefined,
2110
+ DynamoDBStreamParameters: output.DynamoDBStreamParameters != null
2111
+ ? deserializeAws_restJson1PipeSourceDynamoDBStreamParameters(output.DynamoDBStreamParameters, context)
2112
+ : undefined,
2113
+ FilterCriteria: output.FilterCriteria != null
2114
+ ? deserializeAws_restJson1FilterCriteria(output.FilterCriteria, context)
2115
+ : undefined,
2116
+ KinesisStreamParameters: output.KinesisStreamParameters != null
2117
+ ? deserializeAws_restJson1PipeSourceKinesisStreamParameters(output.KinesisStreamParameters, context)
2118
+ : undefined,
2119
+ ManagedStreamingKafkaParameters: output.ManagedStreamingKafkaParameters != null
2120
+ ? deserializeAws_restJson1PipeSourceManagedStreamingKafkaParameters(output.ManagedStreamingKafkaParameters, context)
2121
+ : undefined,
2122
+ RabbitMQBrokerParameters: output.RabbitMQBrokerParameters != null
2123
+ ? deserializeAws_restJson1PipeSourceRabbitMQBrokerParameters(output.RabbitMQBrokerParameters, context)
2124
+ : undefined,
2125
+ SelfManagedKafkaParameters: output.SelfManagedKafkaParameters != null
2126
+ ? deserializeAws_restJson1PipeSourceSelfManagedKafkaParameters(output.SelfManagedKafkaParameters, context)
2127
+ : undefined,
2128
+ SqsQueueParameters: output.SqsQueueParameters != null
2129
+ ? deserializeAws_restJson1PipeSourceSqsQueueParameters(output.SqsQueueParameters, context)
2130
+ : undefined,
2131
+ };
2132
+ };
2133
+ const deserializeAws_restJson1PipeSourceRabbitMQBrokerParameters = (output, context) => {
2134
+ return {
2135
+ BatchSize: __expectInt32(output.BatchSize),
2136
+ Credentials: output.Credentials != null
2137
+ ? deserializeAws_restJson1MQBrokerAccessCredentials(__expectUnion(output.Credentials), context)
2138
+ : undefined,
2139
+ MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds),
2140
+ QueueName: __expectString(output.QueueName),
2141
+ VirtualHost: __expectString(output.VirtualHost),
2142
+ };
2143
+ };
2144
+ const deserializeAws_restJson1PipeSourceSelfManagedKafkaParameters = (output, context) => {
2145
+ return {
2146
+ AdditionalBootstrapServers: output.AdditionalBootstrapServers != null
2147
+ ? deserializeAws_restJson1KafkaBootstrapServers(output.AdditionalBootstrapServers, context)
2148
+ : undefined,
2149
+ BatchSize: __expectInt32(output.BatchSize),
2150
+ ConsumerGroupID: __expectString(output.ConsumerGroupID),
2151
+ Credentials: output.Credentials != null
2152
+ ? deserializeAws_restJson1SelfManagedKafkaAccessConfigurationCredentials(__expectUnion(output.Credentials), context)
2153
+ : undefined,
2154
+ MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds),
2155
+ ServerRootCaCertificate: __expectString(output.ServerRootCaCertificate),
2156
+ StartingPosition: __expectString(output.StartingPosition),
2157
+ TopicName: __expectString(output.TopicName),
2158
+ Vpc: output.Vpc != null
2159
+ ? deserializeAws_restJson1SelfManagedKafkaAccessConfigurationVpc(output.Vpc, context)
2160
+ : undefined,
2161
+ };
2162
+ };
2163
+ const deserializeAws_restJson1PipeSourceSqsQueueParameters = (output, context) => {
2164
+ return {
2165
+ BatchSize: __expectInt32(output.BatchSize),
2166
+ MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds),
2167
+ };
2168
+ };
2169
+ const deserializeAws_restJson1PipeTargetBatchJobParameters = (output, context) => {
2170
+ return {
2171
+ ArrayProperties: output.ArrayProperties != null
2172
+ ? deserializeAws_restJson1BatchArrayProperties(output.ArrayProperties, context)
2173
+ : undefined,
2174
+ ContainerOverrides: output.ContainerOverrides != null
2175
+ ? deserializeAws_restJson1BatchContainerOverrides(output.ContainerOverrides, context)
2176
+ : undefined,
2177
+ DependsOn: output.DependsOn != null ? deserializeAws_restJson1BatchDependsOn(output.DependsOn, context) : undefined,
2178
+ JobDefinition: __expectString(output.JobDefinition),
2179
+ JobName: __expectString(output.JobName),
2180
+ Parameters: output.Parameters != null ? deserializeAws_restJson1BatchParametersMap(output.Parameters, context) : undefined,
2181
+ RetryStrategy: output.RetryStrategy != null
2182
+ ? deserializeAws_restJson1BatchRetryStrategy(output.RetryStrategy, context)
2183
+ : undefined,
2184
+ };
2185
+ };
2186
+ const deserializeAws_restJson1PipeTargetCloudWatchLogsParameters = (output, context) => {
2187
+ return {
2188
+ LogStreamName: __expectString(output.LogStreamName),
2189
+ Timestamp: __expectString(output.Timestamp),
2190
+ };
2191
+ };
2192
+ const deserializeAws_restJson1PipeTargetEcsTaskParameters = (output, context) => {
2193
+ return {
2194
+ CapacityProviderStrategy: output.CapacityProviderStrategy != null
2195
+ ? deserializeAws_restJson1CapacityProviderStrategy(output.CapacityProviderStrategy, context)
2196
+ : undefined,
2197
+ EnableECSManagedTags: __expectBoolean(output.EnableECSManagedTags),
2198
+ EnableExecuteCommand: __expectBoolean(output.EnableExecuteCommand),
2199
+ Group: __expectString(output.Group),
2200
+ LaunchType: __expectString(output.LaunchType),
2201
+ NetworkConfiguration: output.NetworkConfiguration != null
2202
+ ? deserializeAws_restJson1NetworkConfiguration(output.NetworkConfiguration, context)
2203
+ : undefined,
2204
+ Overrides: output.Overrides != null ? deserializeAws_restJson1EcsTaskOverride(output.Overrides, context) : undefined,
2205
+ PlacementConstraints: output.PlacementConstraints != null
2206
+ ? deserializeAws_restJson1PlacementConstraints(output.PlacementConstraints, context)
2207
+ : undefined,
2208
+ PlacementStrategy: output.PlacementStrategy != null
2209
+ ? deserializeAws_restJson1PlacementStrategies(output.PlacementStrategy, context)
2210
+ : undefined,
2211
+ PlatformVersion: __expectString(output.PlatformVersion),
2212
+ PropagateTags: __expectString(output.PropagateTags),
2213
+ ReferenceId: __expectString(output.ReferenceId),
2214
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
2215
+ TaskCount: __expectInt32(output.TaskCount),
2216
+ TaskDefinitionArn: __expectString(output.TaskDefinitionArn),
2217
+ };
2218
+ };
2219
+ const deserializeAws_restJson1PipeTargetEventBridgeEventBusParameters = (output, context) => {
2220
+ return {
2221
+ DetailType: __expectString(output.DetailType),
2222
+ EndpointId: __expectString(output.EndpointId),
2223
+ Resources: output.Resources != null
2224
+ ? deserializeAws_restJson1EventBridgeEventResourceList(output.Resources, context)
2225
+ : undefined,
2226
+ Source: __expectString(output.Source),
2227
+ Time: __expectString(output.Time),
2228
+ };
2229
+ };
2230
+ const deserializeAws_restJson1PipeTargetHttpParameters = (output, context) => {
2231
+ return {
2232
+ HeaderParameters: output.HeaderParameters != null
2233
+ ? deserializeAws_restJson1HeaderParametersMap(output.HeaderParameters, context)
2234
+ : undefined,
2235
+ PathParameterValues: output.PathParameterValues != null
2236
+ ? deserializeAws_restJson1PathParameterList(output.PathParameterValues, context)
2237
+ : undefined,
2238
+ QueryStringParameters: output.QueryStringParameters != null
2239
+ ? deserializeAws_restJson1QueryStringParametersMap(output.QueryStringParameters, context)
2240
+ : undefined,
2241
+ };
2242
+ };
2243
+ const deserializeAws_restJson1PipeTargetKinesisStreamParameters = (output, context) => {
2244
+ return {
2245
+ PartitionKey: __expectString(output.PartitionKey),
2246
+ };
2247
+ };
2248
+ const deserializeAws_restJson1PipeTargetLambdaFunctionParameters = (output, context) => {
2249
+ return {
2250
+ InvocationType: __expectString(output.InvocationType),
2251
+ };
2252
+ };
2253
+ const deserializeAws_restJson1PipeTargetParameters = (output, context) => {
2254
+ return {
2255
+ BatchJobParameters: output.BatchJobParameters != null
2256
+ ? deserializeAws_restJson1PipeTargetBatchJobParameters(output.BatchJobParameters, context)
2257
+ : undefined,
2258
+ CloudWatchLogsParameters: output.CloudWatchLogsParameters != null
2259
+ ? deserializeAws_restJson1PipeTargetCloudWatchLogsParameters(output.CloudWatchLogsParameters, context)
2260
+ : undefined,
2261
+ EcsTaskParameters: output.EcsTaskParameters != null
2262
+ ? deserializeAws_restJson1PipeTargetEcsTaskParameters(output.EcsTaskParameters, context)
2263
+ : undefined,
2264
+ EventBridgeEventBusParameters: output.EventBridgeEventBusParameters != null
2265
+ ? deserializeAws_restJson1PipeTargetEventBridgeEventBusParameters(output.EventBridgeEventBusParameters, context)
2266
+ : undefined,
2267
+ HttpParameters: output.HttpParameters != null
2268
+ ? deserializeAws_restJson1PipeTargetHttpParameters(output.HttpParameters, context)
2269
+ : undefined,
2270
+ InputTemplate: __expectString(output.InputTemplate),
2271
+ KinesisStreamParameters: output.KinesisStreamParameters != null
2272
+ ? deserializeAws_restJson1PipeTargetKinesisStreamParameters(output.KinesisStreamParameters, context)
2273
+ : undefined,
2274
+ LambdaFunctionParameters: output.LambdaFunctionParameters != null
2275
+ ? deserializeAws_restJson1PipeTargetLambdaFunctionParameters(output.LambdaFunctionParameters, context)
2276
+ : undefined,
2277
+ RedshiftDataParameters: output.RedshiftDataParameters != null
2278
+ ? deserializeAws_restJson1PipeTargetRedshiftDataParameters(output.RedshiftDataParameters, context)
2279
+ : undefined,
2280
+ SageMakerPipelineParameters: output.SageMakerPipelineParameters != null
2281
+ ? deserializeAws_restJson1PipeTargetSageMakerPipelineParameters(output.SageMakerPipelineParameters, context)
2282
+ : undefined,
2283
+ SqsQueueParameters: output.SqsQueueParameters != null
2284
+ ? deserializeAws_restJson1PipeTargetSqsQueueParameters(output.SqsQueueParameters, context)
2285
+ : undefined,
2286
+ StepFunctionStateMachineParameters: output.StepFunctionStateMachineParameters != null
2287
+ ? deserializeAws_restJson1PipeTargetStateMachineParameters(output.StepFunctionStateMachineParameters, context)
2288
+ : undefined,
2289
+ };
2290
+ };
2291
+ const deserializeAws_restJson1PipeTargetRedshiftDataParameters = (output, context) => {
2292
+ return {
2293
+ Database: __expectString(output.Database),
2294
+ DbUser: __expectString(output.DbUser),
2295
+ SecretManagerArn: __expectString(output.SecretManagerArn),
2296
+ Sqls: output.Sqls != null ? deserializeAws_restJson1Sqls(output.Sqls, context) : undefined,
2297
+ StatementName: __expectString(output.StatementName),
2298
+ WithEvent: __expectBoolean(output.WithEvent),
2299
+ };
2300
+ };
2301
+ const deserializeAws_restJson1PipeTargetSageMakerPipelineParameters = (output, context) => {
2302
+ return {
2303
+ PipelineParameterList: output.PipelineParameterList != null
2304
+ ? deserializeAws_restJson1SageMakerPipelineParameterList(output.PipelineParameterList, context)
2305
+ : undefined,
2306
+ };
2307
+ };
2308
+ const deserializeAws_restJson1PipeTargetSqsQueueParameters = (output, context) => {
2309
+ return {
2310
+ MessageDeduplicationId: __expectString(output.MessageDeduplicationId),
2311
+ MessageGroupId: __expectString(output.MessageGroupId),
2312
+ };
2313
+ };
2314
+ const deserializeAws_restJson1PipeTargetStateMachineParameters = (output, context) => {
2315
+ return {
2316
+ InvocationType: __expectString(output.InvocationType),
2317
+ };
2318
+ };
2319
+ const deserializeAws_restJson1PlacementConstraint = (output, context) => {
2320
+ return {
2321
+ expression: __expectString(output.expression),
2322
+ type: __expectString(output.type),
2323
+ };
2324
+ };
2325
+ const deserializeAws_restJson1PlacementConstraints = (output, context) => {
2326
+ const retVal = (output || [])
2327
+ .filter((e) => e != null)
2328
+ .map((entry) => {
2329
+ if (entry === null) {
2330
+ return null;
2331
+ }
2332
+ return deserializeAws_restJson1PlacementConstraint(entry, context);
2333
+ });
2334
+ return retVal;
2335
+ };
2336
+ const deserializeAws_restJson1PlacementStrategies = (output, context) => {
2337
+ const retVal = (output || [])
2338
+ .filter((e) => e != null)
2339
+ .map((entry) => {
2340
+ if (entry === null) {
2341
+ return null;
2342
+ }
2343
+ return deserializeAws_restJson1PlacementStrategy(entry, context);
2344
+ });
2345
+ return retVal;
2346
+ };
2347
+ const deserializeAws_restJson1PlacementStrategy = (output, context) => {
2348
+ return {
2349
+ field: __expectString(output.field),
2350
+ type: __expectString(output.type),
2351
+ };
2352
+ };
2353
+ const deserializeAws_restJson1QueryStringParametersMap = (output, context) => {
2354
+ return Object.entries(output).reduce((acc, [key, value]) => {
2355
+ if (value === null) {
2356
+ return acc;
2357
+ }
2358
+ acc[key] = __expectString(value);
2359
+ return acc;
2360
+ }, {});
2361
+ };
2362
+ const deserializeAws_restJson1SageMakerPipelineParameter = (output, context) => {
2363
+ return {
2364
+ Name: __expectString(output.Name),
2365
+ Value: __expectString(output.Value),
2366
+ };
2367
+ };
2368
+ const deserializeAws_restJson1SageMakerPipelineParameterList = (output, context) => {
2369
+ const retVal = (output || [])
2370
+ .filter((e) => e != null)
2371
+ .map((entry) => {
2372
+ if (entry === null) {
2373
+ return null;
2374
+ }
2375
+ return deserializeAws_restJson1SageMakerPipelineParameter(entry, context);
2376
+ });
2377
+ return retVal;
2378
+ };
2379
+ const deserializeAws_restJson1SecurityGroupIds = (output, context) => {
2380
+ const retVal = (output || [])
2381
+ .filter((e) => e != null)
2382
+ .map((entry) => {
2383
+ if (entry === null) {
2384
+ return null;
2385
+ }
2386
+ return __expectString(entry);
2387
+ });
2388
+ return retVal;
2389
+ };
2390
+ const deserializeAws_restJson1SecurityGroups = (output, context) => {
2391
+ const retVal = (output || [])
2392
+ .filter((e) => e != null)
2393
+ .map((entry) => {
2394
+ if (entry === null) {
2395
+ return null;
2396
+ }
2397
+ return __expectString(entry);
2398
+ });
2399
+ return retVal;
2400
+ };
2401
+ const deserializeAws_restJson1SelfManagedKafkaAccessConfigurationCredentials = (output, context) => {
2402
+ if (__expectString(output.BasicAuth) !== undefined) {
2403
+ return { BasicAuth: __expectString(output.BasicAuth) };
2404
+ }
2405
+ if (__expectString(output.ClientCertificateTlsAuth) !== undefined) {
2406
+ return { ClientCertificateTlsAuth: __expectString(output.ClientCertificateTlsAuth) };
2407
+ }
2408
+ if (__expectString(output.SaslScram256Auth) !== undefined) {
2409
+ return { SaslScram256Auth: __expectString(output.SaslScram256Auth) };
2410
+ }
2411
+ if (__expectString(output.SaslScram512Auth) !== undefined) {
2412
+ return { SaslScram512Auth: __expectString(output.SaslScram512Auth) };
2413
+ }
2414
+ return { $unknown: Object.entries(output)[0] };
2415
+ };
2416
+ const deserializeAws_restJson1SelfManagedKafkaAccessConfigurationVpc = (output, context) => {
2417
+ return {
2418
+ SecurityGroup: output.SecurityGroup != null
2419
+ ? deserializeAws_restJson1SecurityGroupIds(output.SecurityGroup, context)
2420
+ : undefined,
2421
+ Subnets: output.Subnets != null ? deserializeAws_restJson1SubnetIds(output.Subnets, context) : undefined,
2422
+ };
2423
+ };
2424
+ const deserializeAws_restJson1Sqls = (output, context) => {
2425
+ const retVal = (output || [])
2426
+ .filter((e) => e != null)
2427
+ .map((entry) => {
2428
+ if (entry === null) {
2429
+ return null;
2430
+ }
2431
+ return __expectString(entry);
2432
+ });
2433
+ return retVal;
2434
+ };
2435
+ const deserializeAws_restJson1StringList = (output, context) => {
2436
+ const retVal = (output || [])
2437
+ .filter((e) => e != null)
2438
+ .map((entry) => {
2439
+ if (entry === null) {
2440
+ return null;
2441
+ }
2442
+ return __expectString(entry);
2443
+ });
2444
+ return retVal;
2445
+ };
2446
+ const deserializeAws_restJson1SubnetIds = (output, context) => {
2447
+ const retVal = (output || [])
2448
+ .filter((e) => e != null)
2449
+ .map((entry) => {
2450
+ if (entry === null) {
2451
+ return null;
2452
+ }
2453
+ return __expectString(entry);
2454
+ });
2455
+ return retVal;
2456
+ };
2457
+ const deserializeAws_restJson1Subnets = (output, context) => {
2458
+ const retVal = (output || [])
2459
+ .filter((e) => e != null)
2460
+ .map((entry) => {
2461
+ if (entry === null) {
2462
+ return null;
2463
+ }
2464
+ return __expectString(entry);
2465
+ });
2466
+ return retVal;
2467
+ };
2468
+ const deserializeAws_restJson1Tag = (output, context) => {
2469
+ return {
2470
+ Key: __expectString(output.Key),
2471
+ Value: __expectString(output.Value),
2472
+ };
2473
+ };
2474
+ const deserializeAws_restJson1TagList = (output, context) => {
2475
+ const retVal = (output || [])
2476
+ .filter((e) => e != null)
2477
+ .map((entry) => {
2478
+ if (entry === null) {
2479
+ return null;
2480
+ }
2481
+ return deserializeAws_restJson1Tag(entry, context);
2482
+ });
2483
+ return retVal;
2484
+ };
2485
+ const deserializeAws_restJson1TagMap = (output, context) => {
2486
+ return Object.entries(output).reduce((acc, [key, value]) => {
2487
+ if (value === null) {
2488
+ return acc;
2489
+ }
2490
+ acc[key] = __expectString(value);
2491
+ return acc;
2492
+ }, {});
2493
+ };
2494
+ const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
2495
+ return {
2496
+ message: __expectString(output.message),
2497
+ name: __expectString(output.name),
2498
+ };
2499
+ };
2500
+ const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) => {
2501
+ const retVal = (output || [])
2502
+ .filter((e) => e != null)
2503
+ .map((entry) => {
2504
+ if (entry === null) {
2505
+ return null;
2506
+ }
2507
+ return deserializeAws_restJson1ValidationExceptionField(entry, context);
2508
+ });
2509
+ return retVal;
2510
+ };
2511
+ const deserializeMetadata = (output) => ({
2512
+ httpStatusCode: output.statusCode,
2513
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2514
+ extendedRequestId: output.headers["x-amz-id-2"],
2515
+ cfId: output.headers["x-amz-cf-id"],
2516
+ });
2517
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2518
+ if (streamBody instanceof Uint8Array) {
2519
+ return Promise.resolve(streamBody);
2520
+ }
2521
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2522
+ };
2523
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2524
+ const isSerializableHeaderValue = (value) => value !== undefined &&
2525
+ value !== null &&
2526
+ value !== "" &&
2527
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2528
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2529
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2530
+ if (encoded.length) {
2531
+ return JSON.parse(encoded);
2532
+ }
2533
+ return {};
2534
+ });
2535
+ const parseErrorBody = async (errorBody, context) => {
2536
+ const value = await parseBody(errorBody, context);
2537
+ value.message = value.message ?? value.Message;
2538
+ return value;
2539
+ };
2540
+ const loadRestJsonErrorCode = (output, data) => {
2541
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2542
+ const sanitizeErrorCode = (rawValue) => {
2543
+ let cleanValue = rawValue;
2544
+ if (typeof cleanValue === "number") {
2545
+ cleanValue = cleanValue.toString();
2546
+ }
2547
+ if (cleanValue.indexOf(",") >= 0) {
2548
+ cleanValue = cleanValue.split(",")[0];
2549
+ }
2550
+ if (cleanValue.indexOf(":") >= 0) {
2551
+ cleanValue = cleanValue.split(":")[0];
2552
+ }
2553
+ if (cleanValue.indexOf("#") >= 0) {
2554
+ cleanValue = cleanValue.split("#")[1];
2555
+ }
2556
+ return cleanValue;
2557
+ };
2558
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2559
+ if (headerKey !== undefined) {
2560
+ return sanitizeErrorCode(output.headers[headerKey]);
2561
+ }
2562
+ if (data.code !== undefined) {
2563
+ return sanitizeErrorCode(data.code);
2564
+ }
2565
+ if (data["__type"] !== undefined) {
2566
+ return sanitizeErrorCode(data["__type"]);
2567
+ }
2568
+ };