@aws-sdk/client-firehose 3.35.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist-cjs/Firehose.js +0 -1
  3. package/dist-cjs/FirehoseClient.js +0 -1
  4. package/dist-cjs/commands/CreateDeliveryStreamCommand.js +0 -1
  5. package/dist-cjs/commands/DeleteDeliveryStreamCommand.js +0 -1
  6. package/dist-cjs/commands/DescribeDeliveryStreamCommand.js +0 -1
  7. package/dist-cjs/commands/ListDeliveryStreamsCommand.js +0 -1
  8. package/dist-cjs/commands/ListTagsForDeliveryStreamCommand.js +0 -1
  9. package/dist-cjs/commands/PutRecordBatchCommand.js +0 -1
  10. package/dist-cjs/commands/PutRecordCommand.js +0 -1
  11. package/dist-cjs/commands/StartDeliveryStreamEncryptionCommand.js +0 -1
  12. package/dist-cjs/commands/StopDeliveryStreamEncryptionCommand.js +0 -1
  13. package/dist-cjs/commands/TagDeliveryStreamCommand.js +0 -1
  14. package/dist-cjs/commands/UntagDeliveryStreamCommand.js +0 -1
  15. package/dist-cjs/commands/UpdateDestinationCommand.js +0 -1
  16. package/dist-cjs/endpoints.js +0 -1
  17. package/dist-cjs/index.js +0 -1
  18. package/dist-cjs/models/index.js +0 -1
  19. package/dist-cjs/models/models_0.js +150 -93
  20. package/dist-cjs/protocols/Aws_json1_1.js +132 -1
  21. package/dist-cjs/runtimeConfig.browser.js +2 -3
  22. package/dist-cjs/runtimeConfig.js +3 -4
  23. package/dist-cjs/runtimeConfig.native.js +0 -1
  24. package/dist-cjs/runtimeConfig.shared.js +0 -1
  25. package/dist-es/Firehose.js +0 -1
  26. package/dist-es/FirehoseClient.js +0 -1
  27. package/dist-es/commands/CreateDeliveryStreamCommand.js +0 -1
  28. package/dist-es/commands/DeleteDeliveryStreamCommand.js +0 -1
  29. package/dist-es/commands/DescribeDeliveryStreamCommand.js +0 -1
  30. package/dist-es/commands/ListDeliveryStreamsCommand.js +0 -1
  31. package/dist-es/commands/ListTagsForDeliveryStreamCommand.js +0 -1
  32. package/dist-es/commands/PutRecordBatchCommand.js +0 -1
  33. package/dist-es/commands/PutRecordCommand.js +0 -1
  34. package/dist-es/commands/StartDeliveryStreamEncryptionCommand.js +0 -1
  35. package/dist-es/commands/StopDeliveryStreamEncryptionCommand.js +0 -1
  36. package/dist-es/commands/TagDeliveryStreamCommand.js +0 -1
  37. package/dist-es/commands/UntagDeliveryStreamCommand.js +0 -1
  38. package/dist-es/commands/UpdateDestinationCommand.js +0 -1
  39. package/dist-es/endpoints.js +0 -1
  40. package/dist-es/index.js +0 -1
  41. package/dist-es/models/index.js +0 -1
  42. package/dist-es/models/models_0.js +87 -55
  43. package/dist-es/protocols/Aws_json1_1.js +101 -3
  44. package/dist-es/runtimeConfig.browser.js +1 -2
  45. package/dist-es/runtimeConfig.js +2 -3
  46. package/dist-es/runtimeConfig.native.js +0 -1
  47. package/dist-es/runtimeConfig.shared.js +0 -1
  48. package/dist-types/models/models_0.d.ts +524 -397
  49. package/dist-types/ts3.4/models/models_0.d.ts +524 -397
  50. package/package.json +33 -30
  51. package/dist-cjs/Firehose.js.map +0 -1
  52. package/dist-cjs/FirehoseClient.js.map +0 -1
  53. package/dist-cjs/commands/CreateDeliveryStreamCommand.js.map +0 -1
  54. package/dist-cjs/commands/DeleteDeliveryStreamCommand.js.map +0 -1
  55. package/dist-cjs/commands/DescribeDeliveryStreamCommand.js.map +0 -1
  56. package/dist-cjs/commands/ListDeliveryStreamsCommand.js.map +0 -1
  57. package/dist-cjs/commands/ListTagsForDeliveryStreamCommand.js.map +0 -1
  58. package/dist-cjs/commands/PutRecordBatchCommand.js.map +0 -1
  59. package/dist-cjs/commands/PutRecordCommand.js.map +0 -1
  60. package/dist-cjs/commands/StartDeliveryStreamEncryptionCommand.js.map +0 -1
  61. package/dist-cjs/commands/StopDeliveryStreamEncryptionCommand.js.map +0 -1
  62. package/dist-cjs/commands/TagDeliveryStreamCommand.js.map +0 -1
  63. package/dist-cjs/commands/UntagDeliveryStreamCommand.js.map +0 -1
  64. package/dist-cjs/commands/UpdateDestinationCommand.js.map +0 -1
  65. package/dist-cjs/endpoints.js.map +0 -1
  66. package/dist-cjs/index.js.map +0 -1
  67. package/dist-cjs/models/index.js.map +0 -1
  68. package/dist-cjs/models/models_0.js.map +0 -1
  69. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  70. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  71. package/dist-cjs/runtimeConfig.js.map +0 -1
  72. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  73. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  74. package/dist-es/Firehose.js.map +0 -1
  75. package/dist-es/FirehoseClient.js.map +0 -1
  76. package/dist-es/commands/CreateDeliveryStreamCommand.js.map +0 -1
  77. package/dist-es/commands/DeleteDeliveryStreamCommand.js.map +0 -1
  78. package/dist-es/commands/DescribeDeliveryStreamCommand.js.map +0 -1
  79. package/dist-es/commands/ListDeliveryStreamsCommand.js.map +0 -1
  80. package/dist-es/commands/ListTagsForDeliveryStreamCommand.js.map +0 -1
  81. package/dist-es/commands/PutRecordBatchCommand.js.map +0 -1
  82. package/dist-es/commands/PutRecordCommand.js.map +0 -1
  83. package/dist-es/commands/StartDeliveryStreamEncryptionCommand.js.map +0 -1
  84. package/dist-es/commands/StopDeliveryStreamEncryptionCommand.js.map +0 -1
  85. package/dist-es/commands/TagDeliveryStreamCommand.js.map +0 -1
  86. package/dist-es/commands/UntagDeliveryStreamCommand.js.map +0 -1
  87. package/dist-es/commands/UpdateDestinationCommand.js.map +0 -1
  88. package/dist-es/endpoints.js.map +0 -1
  89. package/dist-es/index.js.map +0 -1
  90. package/dist-es/models/index.js.map +0 -1
  91. package/dist-es/models/models_0.js.map +0 -1
  92. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  93. package/dist-es/runtimeConfig.browser.js.map +0 -1
  94. package/dist-es/runtimeConfig.js.map +0 -1
  95. package/dist-es/runtimeConfig.native.js.map +0 -1
  96. package/dist-es/runtimeConfig.shared.js.map +0 -1
  97. package/jest.config.js +0 -4
  98. package/src/Firehose.ts +0 -705
  99. package/src/FirehoseClient.ts +0 -299
  100. package/src/commands/CreateDeliveryStreamCommand.ts +0 -163
  101. package/src/commands/DeleteDeliveryStreamCommand.ts +0 -104
  102. package/src/commands/DescribeDeliveryStreamCommand.ts +0 -101
  103. package/src/commands/ListDeliveryStreamsCommand.ts +0 -102
  104. package/src/commands/ListTagsForDeliveryStreamCommand.ts +0 -99
  105. package/src/commands/PutRecordBatchCommand.ts +0 -145
  106. package/src/commands/PutRecordCommand.ts +0 -123
  107. package/src/commands/StartDeliveryStreamEncryptionCommand.ts +0 -135
  108. package/src/commands/StopDeliveryStreamEncryptionCommand.ts +0 -119
  109. package/src/commands/TagDeliveryStreamCommand.ts +0 -103
  110. package/src/commands/UntagDeliveryStreamCommand.ts +0 -98
  111. package/src/commands/UpdateDestinationCommand.ts +0 -118
  112. package/src/endpoints.ts +0 -86
  113. package/src/index.ts +0 -15
  114. package/src/models/index.ts +0 -1
  115. package/src/models/models_0.ts +0 -3952
  116. package/src/protocols/Aws_json1_1.ts +0 -3514
  117. package/src/runtimeConfig.browser.ts +0 -41
  118. package/src/runtimeConfig.native.ts +0 -17
  119. package/src/runtimeConfig.shared.ts +0 -17
  120. package/src/runtimeConfig.ts +0 -46
  121. package/tsconfig.es.json +0 -10
  122. package/tsconfig.json +0 -33
  123. package/tsconfig.types.json +0 -9
@@ -1,3514 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
- import {
3
- expectBoolean as __expectBoolean,
4
- expectInt32 as __expectInt32,
5
- expectNonNull as __expectNonNull,
6
- expectNumber as __expectNumber,
7
- expectString as __expectString,
8
- limitedParseDouble as __limitedParseDouble,
9
- parseEpochTimestamp as __parseEpochTimestamp,
10
- serializeFloat as __serializeFloat,
11
- } from "@aws-sdk/smithy-client";
12
- import {
13
- Endpoint as __Endpoint,
14
- HeaderBag as __HeaderBag,
15
- MetadataBearer as __MetadataBearer,
16
- ResponseMetadata as __ResponseMetadata,
17
- SerdeContext as __SerdeContext,
18
- SmithyException as __SmithyException,
19
- } from "@aws-sdk/types";
20
-
21
- import {
22
- CreateDeliveryStreamCommandInput,
23
- CreateDeliveryStreamCommandOutput,
24
- } from "../commands/CreateDeliveryStreamCommand";
25
- import {
26
- DeleteDeliveryStreamCommandInput,
27
- DeleteDeliveryStreamCommandOutput,
28
- } from "../commands/DeleteDeliveryStreamCommand";
29
- import {
30
- DescribeDeliveryStreamCommandInput,
31
- DescribeDeliveryStreamCommandOutput,
32
- } from "../commands/DescribeDeliveryStreamCommand";
33
- import {
34
- ListDeliveryStreamsCommandInput,
35
- ListDeliveryStreamsCommandOutput,
36
- } from "../commands/ListDeliveryStreamsCommand";
37
- import {
38
- ListTagsForDeliveryStreamCommandInput,
39
- ListTagsForDeliveryStreamCommandOutput,
40
- } from "../commands/ListTagsForDeliveryStreamCommand";
41
- import { PutRecordBatchCommandInput, PutRecordBatchCommandOutput } from "../commands/PutRecordBatchCommand";
42
- import { PutRecordCommandInput, PutRecordCommandOutput } from "../commands/PutRecordCommand";
43
- import {
44
- StartDeliveryStreamEncryptionCommandInput,
45
- StartDeliveryStreamEncryptionCommandOutput,
46
- } from "../commands/StartDeliveryStreamEncryptionCommand";
47
- import {
48
- StopDeliveryStreamEncryptionCommandInput,
49
- StopDeliveryStreamEncryptionCommandOutput,
50
- } from "../commands/StopDeliveryStreamEncryptionCommand";
51
- import { TagDeliveryStreamCommandInput, TagDeliveryStreamCommandOutput } from "../commands/TagDeliveryStreamCommand";
52
- import {
53
- UntagDeliveryStreamCommandInput,
54
- UntagDeliveryStreamCommandOutput,
55
- } from "../commands/UntagDeliveryStreamCommand";
56
- import { UpdateDestinationCommandInput, UpdateDestinationCommandOutput } from "../commands/UpdateDestinationCommand";
57
- import {
58
- _Record,
59
- BufferingHints,
60
- CloudWatchLoggingOptions,
61
- ConcurrentModificationException,
62
- CopyCommand,
63
- CreateDeliveryStreamInput,
64
- CreateDeliveryStreamOutput,
65
- DataFormatConversionConfiguration,
66
- DeleteDeliveryStreamInput,
67
- DeleteDeliveryStreamOutput,
68
- DeliveryStreamDescription,
69
- DeliveryStreamEncryptionConfiguration,
70
- DeliveryStreamEncryptionConfigurationInput,
71
- DescribeDeliveryStreamInput,
72
- DescribeDeliveryStreamOutput,
73
- Deserializer,
74
- DestinationDescription,
75
- DynamicPartitioningConfiguration,
76
- ElasticsearchBufferingHints,
77
- ElasticsearchDestinationConfiguration,
78
- ElasticsearchDestinationDescription,
79
- ElasticsearchDestinationUpdate,
80
- ElasticsearchRetryOptions,
81
- EncryptionConfiguration,
82
- ExtendedS3DestinationConfiguration,
83
- ExtendedS3DestinationDescription,
84
- ExtendedS3DestinationUpdate,
85
- FailureDescription,
86
- HiveJsonSerDe,
87
- HttpEndpointBufferingHints,
88
- HttpEndpointCommonAttribute,
89
- HttpEndpointConfiguration,
90
- HttpEndpointDescription,
91
- HttpEndpointDestinationConfiguration,
92
- HttpEndpointDestinationDescription,
93
- HttpEndpointDestinationUpdate,
94
- HttpEndpointRequestConfiguration,
95
- HttpEndpointRetryOptions,
96
- InputFormatConfiguration,
97
- InvalidArgumentException,
98
- InvalidKMSResourceException,
99
- KinesisStreamSourceConfiguration,
100
- KinesisStreamSourceDescription,
101
- KMSEncryptionConfig,
102
- LimitExceededException,
103
- ListDeliveryStreamsInput,
104
- ListDeliveryStreamsOutput,
105
- ListTagsForDeliveryStreamInput,
106
- ListTagsForDeliveryStreamOutput,
107
- OpenXJsonSerDe,
108
- OrcSerDe,
109
- OutputFormatConfiguration,
110
- ParquetSerDe,
111
- ProcessingConfiguration,
112
- Processor,
113
- ProcessorParameter,
114
- PutRecordBatchInput,
115
- PutRecordBatchOutput,
116
- PutRecordBatchResponseEntry,
117
- PutRecordInput,
118
- PutRecordOutput,
119
- RedshiftDestinationConfiguration,
120
- RedshiftDestinationDescription,
121
- RedshiftDestinationUpdate,
122
- RedshiftRetryOptions,
123
- ResourceInUseException,
124
- ResourceNotFoundException,
125
- RetryOptions,
126
- S3DestinationConfiguration,
127
- S3DestinationDescription,
128
- S3DestinationUpdate,
129
- SchemaConfiguration,
130
- Serializer,
131
- ServiceUnavailableException,
132
- SourceDescription,
133
- SplunkDestinationConfiguration,
134
- SplunkDestinationDescription,
135
- SplunkDestinationUpdate,
136
- SplunkRetryOptions,
137
- StartDeliveryStreamEncryptionInput,
138
- StartDeliveryStreamEncryptionOutput,
139
- StopDeliveryStreamEncryptionInput,
140
- StopDeliveryStreamEncryptionOutput,
141
- Tag,
142
- TagDeliveryStreamInput,
143
- TagDeliveryStreamOutput,
144
- UntagDeliveryStreamInput,
145
- UntagDeliveryStreamOutput,
146
- UpdateDestinationInput,
147
- UpdateDestinationOutput,
148
- VpcConfiguration,
149
- VpcConfigurationDescription,
150
- } from "../models/models_0";
151
-
152
- export const serializeAws_json1_1CreateDeliveryStreamCommand = async (
153
- input: CreateDeliveryStreamCommandInput,
154
- context: __SerdeContext
155
- ): Promise<__HttpRequest> => {
156
- const headers: __HeaderBag = {
157
- "content-type": "application/x-amz-json-1.1",
158
- "x-amz-target": "Firehose_20150804.CreateDeliveryStream",
159
- };
160
- let body: any;
161
- body = JSON.stringify(serializeAws_json1_1CreateDeliveryStreamInput(input, context));
162
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
163
- };
164
-
165
- export const serializeAws_json1_1DeleteDeliveryStreamCommand = async (
166
- input: DeleteDeliveryStreamCommandInput,
167
- context: __SerdeContext
168
- ): Promise<__HttpRequest> => {
169
- const headers: __HeaderBag = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "Firehose_20150804.DeleteDeliveryStream",
172
- };
173
- let body: any;
174
- body = JSON.stringify(serializeAws_json1_1DeleteDeliveryStreamInput(input, context));
175
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
- };
177
-
178
- export const serializeAws_json1_1DescribeDeliveryStreamCommand = async (
179
- input: DescribeDeliveryStreamCommandInput,
180
- context: __SerdeContext
181
- ): Promise<__HttpRequest> => {
182
- const headers: __HeaderBag = {
183
- "content-type": "application/x-amz-json-1.1",
184
- "x-amz-target": "Firehose_20150804.DescribeDeliveryStream",
185
- };
186
- let body: any;
187
- body = JSON.stringify(serializeAws_json1_1DescribeDeliveryStreamInput(input, context));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
-
191
- export const serializeAws_json1_1ListDeliveryStreamsCommand = async (
192
- input: ListDeliveryStreamsCommandInput,
193
- context: __SerdeContext
194
- ): Promise<__HttpRequest> => {
195
- const headers: __HeaderBag = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "Firehose_20150804.ListDeliveryStreams",
198
- };
199
- let body: any;
200
- body = JSON.stringify(serializeAws_json1_1ListDeliveryStreamsInput(input, context));
201
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
- };
203
-
204
- export const serializeAws_json1_1ListTagsForDeliveryStreamCommand = async (
205
- input: ListTagsForDeliveryStreamCommandInput,
206
- context: __SerdeContext
207
- ): Promise<__HttpRequest> => {
208
- const headers: __HeaderBag = {
209
- "content-type": "application/x-amz-json-1.1",
210
- "x-amz-target": "Firehose_20150804.ListTagsForDeliveryStream",
211
- };
212
- let body: any;
213
- body = JSON.stringify(serializeAws_json1_1ListTagsForDeliveryStreamInput(input, context));
214
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
- };
216
-
217
- export const serializeAws_json1_1PutRecordCommand = async (
218
- input: PutRecordCommandInput,
219
- context: __SerdeContext
220
- ): Promise<__HttpRequest> => {
221
- const headers: __HeaderBag = {
222
- "content-type": "application/x-amz-json-1.1",
223
- "x-amz-target": "Firehose_20150804.PutRecord",
224
- };
225
- let body: any;
226
- body = JSON.stringify(serializeAws_json1_1PutRecordInput(input, context));
227
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
228
- };
229
-
230
- export const serializeAws_json1_1PutRecordBatchCommand = async (
231
- input: PutRecordBatchCommandInput,
232
- context: __SerdeContext
233
- ): Promise<__HttpRequest> => {
234
- const headers: __HeaderBag = {
235
- "content-type": "application/x-amz-json-1.1",
236
- "x-amz-target": "Firehose_20150804.PutRecordBatch",
237
- };
238
- let body: any;
239
- body = JSON.stringify(serializeAws_json1_1PutRecordBatchInput(input, context));
240
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
241
- };
242
-
243
- export const serializeAws_json1_1StartDeliveryStreamEncryptionCommand = async (
244
- input: StartDeliveryStreamEncryptionCommandInput,
245
- context: __SerdeContext
246
- ): Promise<__HttpRequest> => {
247
- const headers: __HeaderBag = {
248
- "content-type": "application/x-amz-json-1.1",
249
- "x-amz-target": "Firehose_20150804.StartDeliveryStreamEncryption",
250
- };
251
- let body: any;
252
- body = JSON.stringify(serializeAws_json1_1StartDeliveryStreamEncryptionInput(input, context));
253
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
254
- };
255
-
256
- export const serializeAws_json1_1StopDeliveryStreamEncryptionCommand = async (
257
- input: StopDeliveryStreamEncryptionCommandInput,
258
- context: __SerdeContext
259
- ): Promise<__HttpRequest> => {
260
- const headers: __HeaderBag = {
261
- "content-type": "application/x-amz-json-1.1",
262
- "x-amz-target": "Firehose_20150804.StopDeliveryStreamEncryption",
263
- };
264
- let body: any;
265
- body = JSON.stringify(serializeAws_json1_1StopDeliveryStreamEncryptionInput(input, context));
266
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
267
- };
268
-
269
- export const serializeAws_json1_1TagDeliveryStreamCommand = async (
270
- input: TagDeliveryStreamCommandInput,
271
- context: __SerdeContext
272
- ): Promise<__HttpRequest> => {
273
- const headers: __HeaderBag = {
274
- "content-type": "application/x-amz-json-1.1",
275
- "x-amz-target": "Firehose_20150804.TagDeliveryStream",
276
- };
277
- let body: any;
278
- body = JSON.stringify(serializeAws_json1_1TagDeliveryStreamInput(input, context));
279
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
280
- };
281
-
282
- export const serializeAws_json1_1UntagDeliveryStreamCommand = async (
283
- input: UntagDeliveryStreamCommandInput,
284
- context: __SerdeContext
285
- ): Promise<__HttpRequest> => {
286
- const headers: __HeaderBag = {
287
- "content-type": "application/x-amz-json-1.1",
288
- "x-amz-target": "Firehose_20150804.UntagDeliveryStream",
289
- };
290
- let body: any;
291
- body = JSON.stringify(serializeAws_json1_1UntagDeliveryStreamInput(input, context));
292
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
293
- };
294
-
295
- export const serializeAws_json1_1UpdateDestinationCommand = async (
296
- input: UpdateDestinationCommandInput,
297
- context: __SerdeContext
298
- ): Promise<__HttpRequest> => {
299
- const headers: __HeaderBag = {
300
- "content-type": "application/x-amz-json-1.1",
301
- "x-amz-target": "Firehose_20150804.UpdateDestination",
302
- };
303
- let body: any;
304
- body = JSON.stringify(serializeAws_json1_1UpdateDestinationInput(input, context));
305
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
306
- };
307
-
308
- export const deserializeAws_json1_1CreateDeliveryStreamCommand = async (
309
- output: __HttpResponse,
310
- context: __SerdeContext
311
- ): Promise<CreateDeliveryStreamCommandOutput> => {
312
- if (output.statusCode >= 300) {
313
- return deserializeAws_json1_1CreateDeliveryStreamCommandError(output, context);
314
- }
315
- const data: any = await parseBody(output.body, context);
316
- let contents: any = {};
317
- contents = deserializeAws_json1_1CreateDeliveryStreamOutput(data, context);
318
- const response: CreateDeliveryStreamCommandOutput = {
319
- $metadata: deserializeMetadata(output),
320
- ...contents,
321
- };
322
- return Promise.resolve(response);
323
- };
324
-
325
- const deserializeAws_json1_1CreateDeliveryStreamCommandError = async (
326
- output: __HttpResponse,
327
- context: __SerdeContext
328
- ): Promise<CreateDeliveryStreamCommandOutput> => {
329
- const parsedOutput: any = {
330
- ...output,
331
- body: await parseBody(output.body, context),
332
- };
333
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
334
- let errorCode = "UnknownError";
335
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
336
- switch (errorCode) {
337
- case "InvalidArgumentException":
338
- case "com.amazonaws.firehose#InvalidArgumentException":
339
- response = {
340
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
341
- name: errorCode,
342
- $metadata: deserializeMetadata(output),
343
- };
344
- break;
345
- case "InvalidKMSResourceException":
346
- case "com.amazonaws.firehose#InvalidKMSResourceException":
347
- response = {
348
- ...(await deserializeAws_json1_1InvalidKMSResourceExceptionResponse(parsedOutput, context)),
349
- name: errorCode,
350
- $metadata: deserializeMetadata(output),
351
- };
352
- break;
353
- case "LimitExceededException":
354
- case "com.amazonaws.firehose#LimitExceededException":
355
- response = {
356
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
357
- name: errorCode,
358
- $metadata: deserializeMetadata(output),
359
- };
360
- break;
361
- case "ResourceInUseException":
362
- case "com.amazonaws.firehose#ResourceInUseException":
363
- response = {
364
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
365
- name: errorCode,
366
- $metadata: deserializeMetadata(output),
367
- };
368
- break;
369
- default:
370
- const parsedBody = parsedOutput.body;
371
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
372
- response = {
373
- ...parsedBody,
374
- name: `${errorCode}`,
375
- message: parsedBody.message || parsedBody.Message || errorCode,
376
- $fault: "client",
377
- $metadata: deserializeMetadata(output),
378
- } as any;
379
- }
380
- const message = response.message || response.Message || errorCode;
381
- response.message = message;
382
- delete response.Message;
383
- return Promise.reject(Object.assign(new Error(message), response));
384
- };
385
-
386
- export const deserializeAws_json1_1DeleteDeliveryStreamCommand = async (
387
- output: __HttpResponse,
388
- context: __SerdeContext
389
- ): Promise<DeleteDeliveryStreamCommandOutput> => {
390
- if (output.statusCode >= 300) {
391
- return deserializeAws_json1_1DeleteDeliveryStreamCommandError(output, context);
392
- }
393
- const data: any = await parseBody(output.body, context);
394
- let contents: any = {};
395
- contents = deserializeAws_json1_1DeleteDeliveryStreamOutput(data, context);
396
- const response: DeleteDeliveryStreamCommandOutput = {
397
- $metadata: deserializeMetadata(output),
398
- ...contents,
399
- };
400
- return Promise.resolve(response);
401
- };
402
-
403
- const deserializeAws_json1_1DeleteDeliveryStreamCommandError = async (
404
- output: __HttpResponse,
405
- context: __SerdeContext
406
- ): Promise<DeleteDeliveryStreamCommandOutput> => {
407
- const parsedOutput: any = {
408
- ...output,
409
- body: await parseBody(output.body, context),
410
- };
411
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
412
- let errorCode = "UnknownError";
413
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
414
- switch (errorCode) {
415
- case "ResourceInUseException":
416
- case "com.amazonaws.firehose#ResourceInUseException":
417
- response = {
418
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
419
- name: errorCode,
420
- $metadata: deserializeMetadata(output),
421
- };
422
- break;
423
- case "ResourceNotFoundException":
424
- case "com.amazonaws.firehose#ResourceNotFoundException":
425
- response = {
426
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
427
- name: errorCode,
428
- $metadata: deserializeMetadata(output),
429
- };
430
- break;
431
- default:
432
- const parsedBody = parsedOutput.body;
433
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
434
- response = {
435
- ...parsedBody,
436
- name: `${errorCode}`,
437
- message: parsedBody.message || parsedBody.Message || errorCode,
438
- $fault: "client",
439
- $metadata: deserializeMetadata(output),
440
- } as any;
441
- }
442
- const message = response.message || response.Message || errorCode;
443
- response.message = message;
444
- delete response.Message;
445
- return Promise.reject(Object.assign(new Error(message), response));
446
- };
447
-
448
- export const deserializeAws_json1_1DescribeDeliveryStreamCommand = async (
449
- output: __HttpResponse,
450
- context: __SerdeContext
451
- ): Promise<DescribeDeliveryStreamCommandOutput> => {
452
- if (output.statusCode >= 300) {
453
- return deserializeAws_json1_1DescribeDeliveryStreamCommandError(output, context);
454
- }
455
- const data: any = await parseBody(output.body, context);
456
- let contents: any = {};
457
- contents = deserializeAws_json1_1DescribeDeliveryStreamOutput(data, context);
458
- const response: DescribeDeliveryStreamCommandOutput = {
459
- $metadata: deserializeMetadata(output),
460
- ...contents,
461
- };
462
- return Promise.resolve(response);
463
- };
464
-
465
- const deserializeAws_json1_1DescribeDeliveryStreamCommandError = async (
466
- output: __HttpResponse,
467
- context: __SerdeContext
468
- ): Promise<DescribeDeliveryStreamCommandOutput> => {
469
- const parsedOutput: any = {
470
- ...output,
471
- body: await parseBody(output.body, context),
472
- };
473
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
474
- let errorCode = "UnknownError";
475
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
476
- switch (errorCode) {
477
- case "ResourceNotFoundException":
478
- case "com.amazonaws.firehose#ResourceNotFoundException":
479
- response = {
480
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
481
- name: errorCode,
482
- $metadata: deserializeMetadata(output),
483
- };
484
- break;
485
- default:
486
- const parsedBody = parsedOutput.body;
487
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
488
- response = {
489
- ...parsedBody,
490
- name: `${errorCode}`,
491
- message: parsedBody.message || parsedBody.Message || errorCode,
492
- $fault: "client",
493
- $metadata: deserializeMetadata(output),
494
- } as any;
495
- }
496
- const message = response.message || response.Message || errorCode;
497
- response.message = message;
498
- delete response.Message;
499
- return Promise.reject(Object.assign(new Error(message), response));
500
- };
501
-
502
- export const deserializeAws_json1_1ListDeliveryStreamsCommand = async (
503
- output: __HttpResponse,
504
- context: __SerdeContext
505
- ): Promise<ListDeliveryStreamsCommandOutput> => {
506
- if (output.statusCode >= 300) {
507
- return deserializeAws_json1_1ListDeliveryStreamsCommandError(output, context);
508
- }
509
- const data: any = await parseBody(output.body, context);
510
- let contents: any = {};
511
- contents = deserializeAws_json1_1ListDeliveryStreamsOutput(data, context);
512
- const response: ListDeliveryStreamsCommandOutput = {
513
- $metadata: deserializeMetadata(output),
514
- ...contents,
515
- };
516
- return Promise.resolve(response);
517
- };
518
-
519
- const deserializeAws_json1_1ListDeliveryStreamsCommandError = async (
520
- output: __HttpResponse,
521
- context: __SerdeContext
522
- ): Promise<ListDeliveryStreamsCommandOutput> => {
523
- const parsedOutput: any = {
524
- ...output,
525
- body: await parseBody(output.body, context),
526
- };
527
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
528
- let errorCode = "UnknownError";
529
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
530
- switch (errorCode) {
531
- default:
532
- const parsedBody = parsedOutput.body;
533
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
534
- response = {
535
- ...parsedBody,
536
- name: `${errorCode}`,
537
- message: parsedBody.message || parsedBody.Message || errorCode,
538
- $fault: "client",
539
- $metadata: deserializeMetadata(output),
540
- } as any;
541
- }
542
- const message = response.message || response.Message || errorCode;
543
- response.message = message;
544
- delete response.Message;
545
- return Promise.reject(Object.assign(new Error(message), response));
546
- };
547
-
548
- export const deserializeAws_json1_1ListTagsForDeliveryStreamCommand = async (
549
- output: __HttpResponse,
550
- context: __SerdeContext
551
- ): Promise<ListTagsForDeliveryStreamCommandOutput> => {
552
- if (output.statusCode >= 300) {
553
- return deserializeAws_json1_1ListTagsForDeliveryStreamCommandError(output, context);
554
- }
555
- const data: any = await parseBody(output.body, context);
556
- let contents: any = {};
557
- contents = deserializeAws_json1_1ListTagsForDeliveryStreamOutput(data, context);
558
- const response: ListTagsForDeliveryStreamCommandOutput = {
559
- $metadata: deserializeMetadata(output),
560
- ...contents,
561
- };
562
- return Promise.resolve(response);
563
- };
564
-
565
- const deserializeAws_json1_1ListTagsForDeliveryStreamCommandError = async (
566
- output: __HttpResponse,
567
- context: __SerdeContext
568
- ): Promise<ListTagsForDeliveryStreamCommandOutput> => {
569
- const parsedOutput: any = {
570
- ...output,
571
- body: await parseBody(output.body, context),
572
- };
573
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
574
- let errorCode = "UnknownError";
575
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
576
- switch (errorCode) {
577
- case "InvalidArgumentException":
578
- case "com.amazonaws.firehose#InvalidArgumentException":
579
- response = {
580
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
581
- name: errorCode,
582
- $metadata: deserializeMetadata(output),
583
- };
584
- break;
585
- case "LimitExceededException":
586
- case "com.amazonaws.firehose#LimitExceededException":
587
- response = {
588
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
589
- name: errorCode,
590
- $metadata: deserializeMetadata(output),
591
- };
592
- break;
593
- case "ResourceNotFoundException":
594
- case "com.amazonaws.firehose#ResourceNotFoundException":
595
- response = {
596
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
597
- name: errorCode,
598
- $metadata: deserializeMetadata(output),
599
- };
600
- break;
601
- default:
602
- const parsedBody = parsedOutput.body;
603
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
604
- response = {
605
- ...parsedBody,
606
- name: `${errorCode}`,
607
- message: parsedBody.message || parsedBody.Message || errorCode,
608
- $fault: "client",
609
- $metadata: deserializeMetadata(output),
610
- } as any;
611
- }
612
- const message = response.message || response.Message || errorCode;
613
- response.message = message;
614
- delete response.Message;
615
- return Promise.reject(Object.assign(new Error(message), response));
616
- };
617
-
618
- export const deserializeAws_json1_1PutRecordCommand = async (
619
- output: __HttpResponse,
620
- context: __SerdeContext
621
- ): Promise<PutRecordCommandOutput> => {
622
- if (output.statusCode >= 300) {
623
- return deserializeAws_json1_1PutRecordCommandError(output, context);
624
- }
625
- const data: any = await parseBody(output.body, context);
626
- let contents: any = {};
627
- contents = deserializeAws_json1_1PutRecordOutput(data, context);
628
- const response: PutRecordCommandOutput = {
629
- $metadata: deserializeMetadata(output),
630
- ...contents,
631
- };
632
- return Promise.resolve(response);
633
- };
634
-
635
- const deserializeAws_json1_1PutRecordCommandError = async (
636
- output: __HttpResponse,
637
- context: __SerdeContext
638
- ): Promise<PutRecordCommandOutput> => {
639
- const parsedOutput: any = {
640
- ...output,
641
- body: await parseBody(output.body, context),
642
- };
643
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
644
- let errorCode = "UnknownError";
645
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
646
- switch (errorCode) {
647
- case "InvalidArgumentException":
648
- case "com.amazonaws.firehose#InvalidArgumentException":
649
- response = {
650
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
651
- name: errorCode,
652
- $metadata: deserializeMetadata(output),
653
- };
654
- break;
655
- case "InvalidKMSResourceException":
656
- case "com.amazonaws.firehose#InvalidKMSResourceException":
657
- response = {
658
- ...(await deserializeAws_json1_1InvalidKMSResourceExceptionResponse(parsedOutput, context)),
659
- name: errorCode,
660
- $metadata: deserializeMetadata(output),
661
- };
662
- break;
663
- case "ResourceNotFoundException":
664
- case "com.amazonaws.firehose#ResourceNotFoundException":
665
- response = {
666
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
667
- name: errorCode,
668
- $metadata: deserializeMetadata(output),
669
- };
670
- break;
671
- case "ServiceUnavailableException":
672
- case "com.amazonaws.firehose#ServiceUnavailableException":
673
- response = {
674
- ...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
675
- name: errorCode,
676
- $metadata: deserializeMetadata(output),
677
- };
678
- break;
679
- default:
680
- const parsedBody = parsedOutput.body;
681
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
682
- response = {
683
- ...parsedBody,
684
- name: `${errorCode}`,
685
- message: parsedBody.message || parsedBody.Message || errorCode,
686
- $fault: "client",
687
- $metadata: deserializeMetadata(output),
688
- } as any;
689
- }
690
- const message = response.message || response.Message || errorCode;
691
- response.message = message;
692
- delete response.Message;
693
- return Promise.reject(Object.assign(new Error(message), response));
694
- };
695
-
696
- export const deserializeAws_json1_1PutRecordBatchCommand = async (
697
- output: __HttpResponse,
698
- context: __SerdeContext
699
- ): Promise<PutRecordBatchCommandOutput> => {
700
- if (output.statusCode >= 300) {
701
- return deserializeAws_json1_1PutRecordBatchCommandError(output, context);
702
- }
703
- const data: any = await parseBody(output.body, context);
704
- let contents: any = {};
705
- contents = deserializeAws_json1_1PutRecordBatchOutput(data, context);
706
- const response: PutRecordBatchCommandOutput = {
707
- $metadata: deserializeMetadata(output),
708
- ...contents,
709
- };
710
- return Promise.resolve(response);
711
- };
712
-
713
- const deserializeAws_json1_1PutRecordBatchCommandError = async (
714
- output: __HttpResponse,
715
- context: __SerdeContext
716
- ): Promise<PutRecordBatchCommandOutput> => {
717
- const parsedOutput: any = {
718
- ...output,
719
- body: await parseBody(output.body, context),
720
- };
721
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
722
- let errorCode = "UnknownError";
723
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
724
- switch (errorCode) {
725
- case "InvalidArgumentException":
726
- case "com.amazonaws.firehose#InvalidArgumentException":
727
- response = {
728
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
729
- name: errorCode,
730
- $metadata: deserializeMetadata(output),
731
- };
732
- break;
733
- case "InvalidKMSResourceException":
734
- case "com.amazonaws.firehose#InvalidKMSResourceException":
735
- response = {
736
- ...(await deserializeAws_json1_1InvalidKMSResourceExceptionResponse(parsedOutput, context)),
737
- name: errorCode,
738
- $metadata: deserializeMetadata(output),
739
- };
740
- break;
741
- case "ResourceNotFoundException":
742
- case "com.amazonaws.firehose#ResourceNotFoundException":
743
- response = {
744
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
745
- name: errorCode,
746
- $metadata: deserializeMetadata(output),
747
- };
748
- break;
749
- case "ServiceUnavailableException":
750
- case "com.amazonaws.firehose#ServiceUnavailableException":
751
- response = {
752
- ...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
753
- name: errorCode,
754
- $metadata: deserializeMetadata(output),
755
- };
756
- break;
757
- default:
758
- const parsedBody = parsedOutput.body;
759
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
760
- response = {
761
- ...parsedBody,
762
- name: `${errorCode}`,
763
- message: parsedBody.message || parsedBody.Message || errorCode,
764
- $fault: "client",
765
- $metadata: deserializeMetadata(output),
766
- } as any;
767
- }
768
- const message = response.message || response.Message || errorCode;
769
- response.message = message;
770
- delete response.Message;
771
- return Promise.reject(Object.assign(new Error(message), response));
772
- };
773
-
774
- export const deserializeAws_json1_1StartDeliveryStreamEncryptionCommand = async (
775
- output: __HttpResponse,
776
- context: __SerdeContext
777
- ): Promise<StartDeliveryStreamEncryptionCommandOutput> => {
778
- if (output.statusCode >= 300) {
779
- return deserializeAws_json1_1StartDeliveryStreamEncryptionCommandError(output, context);
780
- }
781
- const data: any = await parseBody(output.body, context);
782
- let contents: any = {};
783
- contents = deserializeAws_json1_1StartDeliveryStreamEncryptionOutput(data, context);
784
- const response: StartDeliveryStreamEncryptionCommandOutput = {
785
- $metadata: deserializeMetadata(output),
786
- ...contents,
787
- };
788
- return Promise.resolve(response);
789
- };
790
-
791
- const deserializeAws_json1_1StartDeliveryStreamEncryptionCommandError = async (
792
- output: __HttpResponse,
793
- context: __SerdeContext
794
- ): Promise<StartDeliveryStreamEncryptionCommandOutput> => {
795
- const parsedOutput: any = {
796
- ...output,
797
- body: await parseBody(output.body, context),
798
- };
799
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
800
- let errorCode = "UnknownError";
801
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
802
- switch (errorCode) {
803
- case "InvalidArgumentException":
804
- case "com.amazonaws.firehose#InvalidArgumentException":
805
- response = {
806
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
807
- name: errorCode,
808
- $metadata: deserializeMetadata(output),
809
- };
810
- break;
811
- case "InvalidKMSResourceException":
812
- case "com.amazonaws.firehose#InvalidKMSResourceException":
813
- response = {
814
- ...(await deserializeAws_json1_1InvalidKMSResourceExceptionResponse(parsedOutput, context)),
815
- name: errorCode,
816
- $metadata: deserializeMetadata(output),
817
- };
818
- break;
819
- case "LimitExceededException":
820
- case "com.amazonaws.firehose#LimitExceededException":
821
- response = {
822
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
823
- name: errorCode,
824
- $metadata: deserializeMetadata(output),
825
- };
826
- break;
827
- case "ResourceInUseException":
828
- case "com.amazonaws.firehose#ResourceInUseException":
829
- response = {
830
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
831
- name: errorCode,
832
- $metadata: deserializeMetadata(output),
833
- };
834
- break;
835
- case "ResourceNotFoundException":
836
- case "com.amazonaws.firehose#ResourceNotFoundException":
837
- response = {
838
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
839
- name: errorCode,
840
- $metadata: deserializeMetadata(output),
841
- };
842
- break;
843
- default:
844
- const parsedBody = parsedOutput.body;
845
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
846
- response = {
847
- ...parsedBody,
848
- name: `${errorCode}`,
849
- message: parsedBody.message || parsedBody.Message || errorCode,
850
- $fault: "client",
851
- $metadata: deserializeMetadata(output),
852
- } as any;
853
- }
854
- const message = response.message || response.Message || errorCode;
855
- response.message = message;
856
- delete response.Message;
857
- return Promise.reject(Object.assign(new Error(message), response));
858
- };
859
-
860
- export const deserializeAws_json1_1StopDeliveryStreamEncryptionCommand = async (
861
- output: __HttpResponse,
862
- context: __SerdeContext
863
- ): Promise<StopDeliveryStreamEncryptionCommandOutput> => {
864
- if (output.statusCode >= 300) {
865
- return deserializeAws_json1_1StopDeliveryStreamEncryptionCommandError(output, context);
866
- }
867
- const data: any = await parseBody(output.body, context);
868
- let contents: any = {};
869
- contents = deserializeAws_json1_1StopDeliveryStreamEncryptionOutput(data, context);
870
- const response: StopDeliveryStreamEncryptionCommandOutput = {
871
- $metadata: deserializeMetadata(output),
872
- ...contents,
873
- };
874
- return Promise.resolve(response);
875
- };
876
-
877
- const deserializeAws_json1_1StopDeliveryStreamEncryptionCommandError = async (
878
- output: __HttpResponse,
879
- context: __SerdeContext
880
- ): Promise<StopDeliveryStreamEncryptionCommandOutput> => {
881
- const parsedOutput: any = {
882
- ...output,
883
- body: await parseBody(output.body, context),
884
- };
885
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
886
- let errorCode = "UnknownError";
887
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
- switch (errorCode) {
889
- case "InvalidArgumentException":
890
- case "com.amazonaws.firehose#InvalidArgumentException":
891
- response = {
892
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
893
- name: errorCode,
894
- $metadata: deserializeMetadata(output),
895
- };
896
- break;
897
- case "LimitExceededException":
898
- case "com.amazonaws.firehose#LimitExceededException":
899
- response = {
900
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
901
- name: errorCode,
902
- $metadata: deserializeMetadata(output),
903
- };
904
- break;
905
- case "ResourceInUseException":
906
- case "com.amazonaws.firehose#ResourceInUseException":
907
- response = {
908
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
909
- name: errorCode,
910
- $metadata: deserializeMetadata(output),
911
- };
912
- break;
913
- case "ResourceNotFoundException":
914
- case "com.amazonaws.firehose#ResourceNotFoundException":
915
- response = {
916
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
917
- name: errorCode,
918
- $metadata: deserializeMetadata(output),
919
- };
920
- break;
921
- default:
922
- const parsedBody = parsedOutput.body;
923
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
924
- response = {
925
- ...parsedBody,
926
- name: `${errorCode}`,
927
- message: parsedBody.message || parsedBody.Message || errorCode,
928
- $fault: "client",
929
- $metadata: deserializeMetadata(output),
930
- } as any;
931
- }
932
- const message = response.message || response.Message || errorCode;
933
- response.message = message;
934
- delete response.Message;
935
- return Promise.reject(Object.assign(new Error(message), response));
936
- };
937
-
938
- export const deserializeAws_json1_1TagDeliveryStreamCommand = async (
939
- output: __HttpResponse,
940
- context: __SerdeContext
941
- ): Promise<TagDeliveryStreamCommandOutput> => {
942
- if (output.statusCode >= 300) {
943
- return deserializeAws_json1_1TagDeliveryStreamCommandError(output, context);
944
- }
945
- const data: any = await parseBody(output.body, context);
946
- let contents: any = {};
947
- contents = deserializeAws_json1_1TagDeliveryStreamOutput(data, context);
948
- const response: TagDeliveryStreamCommandOutput = {
949
- $metadata: deserializeMetadata(output),
950
- ...contents,
951
- };
952
- return Promise.resolve(response);
953
- };
954
-
955
- const deserializeAws_json1_1TagDeliveryStreamCommandError = async (
956
- output: __HttpResponse,
957
- context: __SerdeContext
958
- ): Promise<TagDeliveryStreamCommandOutput> => {
959
- const parsedOutput: any = {
960
- ...output,
961
- body: await parseBody(output.body, context),
962
- };
963
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
964
- let errorCode = "UnknownError";
965
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
966
- switch (errorCode) {
967
- case "InvalidArgumentException":
968
- case "com.amazonaws.firehose#InvalidArgumentException":
969
- response = {
970
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
971
- name: errorCode,
972
- $metadata: deserializeMetadata(output),
973
- };
974
- break;
975
- case "LimitExceededException":
976
- case "com.amazonaws.firehose#LimitExceededException":
977
- response = {
978
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
979
- name: errorCode,
980
- $metadata: deserializeMetadata(output),
981
- };
982
- break;
983
- case "ResourceInUseException":
984
- case "com.amazonaws.firehose#ResourceInUseException":
985
- response = {
986
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
987
- name: errorCode,
988
- $metadata: deserializeMetadata(output),
989
- };
990
- break;
991
- case "ResourceNotFoundException":
992
- case "com.amazonaws.firehose#ResourceNotFoundException":
993
- response = {
994
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
995
- name: errorCode,
996
- $metadata: deserializeMetadata(output),
997
- };
998
- break;
999
- default:
1000
- const parsedBody = parsedOutput.body;
1001
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1002
- response = {
1003
- ...parsedBody,
1004
- name: `${errorCode}`,
1005
- message: parsedBody.message || parsedBody.Message || errorCode,
1006
- $fault: "client",
1007
- $metadata: deserializeMetadata(output),
1008
- } as any;
1009
- }
1010
- const message = response.message || response.Message || errorCode;
1011
- response.message = message;
1012
- delete response.Message;
1013
- return Promise.reject(Object.assign(new Error(message), response));
1014
- };
1015
-
1016
- export const deserializeAws_json1_1UntagDeliveryStreamCommand = async (
1017
- output: __HttpResponse,
1018
- context: __SerdeContext
1019
- ): Promise<UntagDeliveryStreamCommandOutput> => {
1020
- if (output.statusCode >= 300) {
1021
- return deserializeAws_json1_1UntagDeliveryStreamCommandError(output, context);
1022
- }
1023
- const data: any = await parseBody(output.body, context);
1024
- let contents: any = {};
1025
- contents = deserializeAws_json1_1UntagDeliveryStreamOutput(data, context);
1026
- const response: UntagDeliveryStreamCommandOutput = {
1027
- $metadata: deserializeMetadata(output),
1028
- ...contents,
1029
- };
1030
- return Promise.resolve(response);
1031
- };
1032
-
1033
- const deserializeAws_json1_1UntagDeliveryStreamCommandError = async (
1034
- output: __HttpResponse,
1035
- context: __SerdeContext
1036
- ): Promise<UntagDeliveryStreamCommandOutput> => {
1037
- const parsedOutput: any = {
1038
- ...output,
1039
- body: await parseBody(output.body, context),
1040
- };
1041
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1042
- let errorCode = "UnknownError";
1043
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
- switch (errorCode) {
1045
- case "InvalidArgumentException":
1046
- case "com.amazonaws.firehose#InvalidArgumentException":
1047
- response = {
1048
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
1049
- name: errorCode,
1050
- $metadata: deserializeMetadata(output),
1051
- };
1052
- break;
1053
- case "LimitExceededException":
1054
- case "com.amazonaws.firehose#LimitExceededException":
1055
- response = {
1056
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1057
- name: errorCode,
1058
- $metadata: deserializeMetadata(output),
1059
- };
1060
- break;
1061
- case "ResourceInUseException":
1062
- case "com.amazonaws.firehose#ResourceInUseException":
1063
- response = {
1064
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
1065
- name: errorCode,
1066
- $metadata: deserializeMetadata(output),
1067
- };
1068
- break;
1069
- case "ResourceNotFoundException":
1070
- case "com.amazonaws.firehose#ResourceNotFoundException":
1071
- response = {
1072
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1073
- name: errorCode,
1074
- $metadata: deserializeMetadata(output),
1075
- };
1076
- break;
1077
- default:
1078
- const parsedBody = parsedOutput.body;
1079
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1080
- response = {
1081
- ...parsedBody,
1082
- name: `${errorCode}`,
1083
- message: parsedBody.message || parsedBody.Message || errorCode,
1084
- $fault: "client",
1085
- $metadata: deserializeMetadata(output),
1086
- } as any;
1087
- }
1088
- const message = response.message || response.Message || errorCode;
1089
- response.message = message;
1090
- delete response.Message;
1091
- return Promise.reject(Object.assign(new Error(message), response));
1092
- };
1093
-
1094
- export const deserializeAws_json1_1UpdateDestinationCommand = async (
1095
- output: __HttpResponse,
1096
- context: __SerdeContext
1097
- ): Promise<UpdateDestinationCommandOutput> => {
1098
- if (output.statusCode >= 300) {
1099
- return deserializeAws_json1_1UpdateDestinationCommandError(output, context);
1100
- }
1101
- const data: any = await parseBody(output.body, context);
1102
- let contents: any = {};
1103
- contents = deserializeAws_json1_1UpdateDestinationOutput(data, context);
1104
- const response: UpdateDestinationCommandOutput = {
1105
- $metadata: deserializeMetadata(output),
1106
- ...contents,
1107
- };
1108
- return Promise.resolve(response);
1109
- };
1110
-
1111
- const deserializeAws_json1_1UpdateDestinationCommandError = async (
1112
- output: __HttpResponse,
1113
- context: __SerdeContext
1114
- ): Promise<UpdateDestinationCommandOutput> => {
1115
- const parsedOutput: any = {
1116
- ...output,
1117
- body: await parseBody(output.body, context),
1118
- };
1119
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1120
- let errorCode = "UnknownError";
1121
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1122
- switch (errorCode) {
1123
- case "ConcurrentModificationException":
1124
- case "com.amazonaws.firehose#ConcurrentModificationException":
1125
- response = {
1126
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
1127
- name: errorCode,
1128
- $metadata: deserializeMetadata(output),
1129
- };
1130
- break;
1131
- case "InvalidArgumentException":
1132
- case "com.amazonaws.firehose#InvalidArgumentException":
1133
- response = {
1134
- ...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
1135
- name: errorCode,
1136
- $metadata: deserializeMetadata(output),
1137
- };
1138
- break;
1139
- case "ResourceInUseException":
1140
- case "com.amazonaws.firehose#ResourceInUseException":
1141
- response = {
1142
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
1143
- name: errorCode,
1144
- $metadata: deserializeMetadata(output),
1145
- };
1146
- break;
1147
- case "ResourceNotFoundException":
1148
- case "com.amazonaws.firehose#ResourceNotFoundException":
1149
- response = {
1150
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1151
- name: errorCode,
1152
- $metadata: deserializeMetadata(output),
1153
- };
1154
- break;
1155
- default:
1156
- const parsedBody = parsedOutput.body;
1157
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1158
- response = {
1159
- ...parsedBody,
1160
- name: `${errorCode}`,
1161
- message: parsedBody.message || parsedBody.Message || errorCode,
1162
- $fault: "client",
1163
- $metadata: deserializeMetadata(output),
1164
- } as any;
1165
- }
1166
- const message = response.message || response.Message || errorCode;
1167
- response.message = message;
1168
- delete response.Message;
1169
- return Promise.reject(Object.assign(new Error(message), response));
1170
- };
1171
-
1172
- const deserializeAws_json1_1ConcurrentModificationExceptionResponse = async (
1173
- parsedOutput: any,
1174
- context: __SerdeContext
1175
- ): Promise<ConcurrentModificationException> => {
1176
- const body = parsedOutput.body;
1177
- const deserialized: any = deserializeAws_json1_1ConcurrentModificationException(body, context);
1178
- const contents: ConcurrentModificationException = {
1179
- name: "ConcurrentModificationException",
1180
- $fault: "client",
1181
- $metadata: deserializeMetadata(parsedOutput),
1182
- ...deserialized,
1183
- };
1184
- return contents;
1185
- };
1186
-
1187
- const deserializeAws_json1_1InvalidArgumentExceptionResponse = async (
1188
- parsedOutput: any,
1189
- context: __SerdeContext
1190
- ): Promise<InvalidArgumentException> => {
1191
- const body = parsedOutput.body;
1192
- const deserialized: any = deserializeAws_json1_1InvalidArgumentException(body, context);
1193
- const contents: InvalidArgumentException = {
1194
- name: "InvalidArgumentException",
1195
- $fault: "client",
1196
- $metadata: deserializeMetadata(parsedOutput),
1197
- ...deserialized,
1198
- };
1199
- return contents;
1200
- };
1201
-
1202
- const deserializeAws_json1_1InvalidKMSResourceExceptionResponse = async (
1203
- parsedOutput: any,
1204
- context: __SerdeContext
1205
- ): Promise<InvalidKMSResourceException> => {
1206
- const body = parsedOutput.body;
1207
- const deserialized: any = deserializeAws_json1_1InvalidKMSResourceException(body, context);
1208
- const contents: InvalidKMSResourceException = {
1209
- name: "InvalidKMSResourceException",
1210
- $fault: "client",
1211
- $metadata: deserializeMetadata(parsedOutput),
1212
- ...deserialized,
1213
- };
1214
- return contents;
1215
- };
1216
-
1217
- const deserializeAws_json1_1LimitExceededExceptionResponse = async (
1218
- parsedOutput: any,
1219
- context: __SerdeContext
1220
- ): Promise<LimitExceededException> => {
1221
- const body = parsedOutput.body;
1222
- const deserialized: any = deserializeAws_json1_1LimitExceededException(body, context);
1223
- const contents: LimitExceededException = {
1224
- name: "LimitExceededException",
1225
- $fault: "client",
1226
- $metadata: deserializeMetadata(parsedOutput),
1227
- ...deserialized,
1228
- };
1229
- return contents;
1230
- };
1231
-
1232
- const deserializeAws_json1_1ResourceInUseExceptionResponse = async (
1233
- parsedOutput: any,
1234
- context: __SerdeContext
1235
- ): Promise<ResourceInUseException> => {
1236
- const body = parsedOutput.body;
1237
- const deserialized: any = deserializeAws_json1_1ResourceInUseException(body, context);
1238
- const contents: ResourceInUseException = {
1239
- name: "ResourceInUseException",
1240
- $fault: "client",
1241
- $metadata: deserializeMetadata(parsedOutput),
1242
- ...deserialized,
1243
- };
1244
- return contents;
1245
- };
1246
-
1247
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
1248
- parsedOutput: any,
1249
- context: __SerdeContext
1250
- ): Promise<ResourceNotFoundException> => {
1251
- const body = parsedOutput.body;
1252
- const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
1253
- const contents: ResourceNotFoundException = {
1254
- name: "ResourceNotFoundException",
1255
- $fault: "client",
1256
- $metadata: deserializeMetadata(parsedOutput),
1257
- ...deserialized,
1258
- };
1259
- return contents;
1260
- };
1261
-
1262
- const deserializeAws_json1_1ServiceUnavailableExceptionResponse = async (
1263
- parsedOutput: any,
1264
- context: __SerdeContext
1265
- ): Promise<ServiceUnavailableException> => {
1266
- const body = parsedOutput.body;
1267
- const deserialized: any = deserializeAws_json1_1ServiceUnavailableException(body, context);
1268
- const contents: ServiceUnavailableException = {
1269
- name: "ServiceUnavailableException",
1270
- $fault: "server",
1271
- $metadata: deserializeMetadata(parsedOutput),
1272
- ...deserialized,
1273
- };
1274
- return contents;
1275
- };
1276
-
1277
- const serializeAws_json1_1BufferingHints = (input: BufferingHints, context: __SerdeContext): any => {
1278
- return {
1279
- ...(input.IntervalInSeconds !== undefined &&
1280
- input.IntervalInSeconds !== null && { IntervalInSeconds: input.IntervalInSeconds }),
1281
- ...(input.SizeInMBs !== undefined && input.SizeInMBs !== null && { SizeInMBs: input.SizeInMBs }),
1282
- };
1283
- };
1284
-
1285
- const serializeAws_json1_1CloudWatchLoggingOptions = (
1286
- input: CloudWatchLoggingOptions,
1287
- context: __SerdeContext
1288
- ): any => {
1289
- return {
1290
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
1291
- ...(input.LogGroupName !== undefined && input.LogGroupName !== null && { LogGroupName: input.LogGroupName }),
1292
- ...(input.LogStreamName !== undefined && input.LogStreamName !== null && { LogStreamName: input.LogStreamName }),
1293
- };
1294
- };
1295
-
1296
- const serializeAws_json1_1ColumnToJsonKeyMappings = (
1297
- input: { [key: string]: string },
1298
- context: __SerdeContext
1299
- ): any => {
1300
- return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
1301
- if (value === null) {
1302
- return acc;
1303
- }
1304
- return {
1305
- ...acc,
1306
- [key]: value,
1307
- };
1308
- }, {});
1309
- };
1310
-
1311
- const serializeAws_json1_1CopyCommand = (input: CopyCommand, context: __SerdeContext): any => {
1312
- return {
1313
- ...(input.CopyOptions !== undefined && input.CopyOptions !== null && { CopyOptions: input.CopyOptions }),
1314
- ...(input.DataTableColumns !== undefined &&
1315
- input.DataTableColumns !== null && { DataTableColumns: input.DataTableColumns }),
1316
- ...(input.DataTableName !== undefined && input.DataTableName !== null && { DataTableName: input.DataTableName }),
1317
- };
1318
- };
1319
-
1320
- const serializeAws_json1_1CreateDeliveryStreamInput = (
1321
- input: CreateDeliveryStreamInput,
1322
- context: __SerdeContext
1323
- ): any => {
1324
- return {
1325
- ...(input.DeliveryStreamEncryptionConfigurationInput !== undefined &&
1326
- input.DeliveryStreamEncryptionConfigurationInput !== null && {
1327
- DeliveryStreamEncryptionConfigurationInput: serializeAws_json1_1DeliveryStreamEncryptionConfigurationInput(
1328
- input.DeliveryStreamEncryptionConfigurationInput,
1329
- context
1330
- ),
1331
- }),
1332
- ...(input.DeliveryStreamName !== undefined &&
1333
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
1334
- ...(input.DeliveryStreamType !== undefined &&
1335
- input.DeliveryStreamType !== null && { DeliveryStreamType: input.DeliveryStreamType }),
1336
- ...(input.ElasticsearchDestinationConfiguration !== undefined &&
1337
- input.ElasticsearchDestinationConfiguration !== null && {
1338
- ElasticsearchDestinationConfiguration: serializeAws_json1_1ElasticsearchDestinationConfiguration(
1339
- input.ElasticsearchDestinationConfiguration,
1340
- context
1341
- ),
1342
- }),
1343
- ...(input.ExtendedS3DestinationConfiguration !== undefined &&
1344
- input.ExtendedS3DestinationConfiguration !== null && {
1345
- ExtendedS3DestinationConfiguration: serializeAws_json1_1ExtendedS3DestinationConfiguration(
1346
- input.ExtendedS3DestinationConfiguration,
1347
- context
1348
- ),
1349
- }),
1350
- ...(input.HttpEndpointDestinationConfiguration !== undefined &&
1351
- input.HttpEndpointDestinationConfiguration !== null && {
1352
- HttpEndpointDestinationConfiguration: serializeAws_json1_1HttpEndpointDestinationConfiguration(
1353
- input.HttpEndpointDestinationConfiguration,
1354
- context
1355
- ),
1356
- }),
1357
- ...(input.KinesisStreamSourceConfiguration !== undefined &&
1358
- input.KinesisStreamSourceConfiguration !== null && {
1359
- KinesisStreamSourceConfiguration: serializeAws_json1_1KinesisStreamSourceConfiguration(
1360
- input.KinesisStreamSourceConfiguration,
1361
- context
1362
- ),
1363
- }),
1364
- ...(input.RedshiftDestinationConfiguration !== undefined &&
1365
- input.RedshiftDestinationConfiguration !== null && {
1366
- RedshiftDestinationConfiguration: serializeAws_json1_1RedshiftDestinationConfiguration(
1367
- input.RedshiftDestinationConfiguration,
1368
- context
1369
- ),
1370
- }),
1371
- ...(input.S3DestinationConfiguration !== undefined &&
1372
- input.S3DestinationConfiguration !== null && {
1373
- S3DestinationConfiguration: serializeAws_json1_1S3DestinationConfiguration(
1374
- input.S3DestinationConfiguration,
1375
- context
1376
- ),
1377
- }),
1378
- ...(input.SplunkDestinationConfiguration !== undefined &&
1379
- input.SplunkDestinationConfiguration !== null && {
1380
- SplunkDestinationConfiguration: serializeAws_json1_1SplunkDestinationConfiguration(
1381
- input.SplunkDestinationConfiguration,
1382
- context
1383
- ),
1384
- }),
1385
- ...(input.Tags !== undefined &&
1386
- input.Tags !== null && { Tags: serializeAws_json1_1TagDeliveryStreamInputTagList(input.Tags, context) }),
1387
- };
1388
- };
1389
-
1390
- const serializeAws_json1_1DataFormatConversionConfiguration = (
1391
- input: DataFormatConversionConfiguration,
1392
- context: __SerdeContext
1393
- ): any => {
1394
- return {
1395
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
1396
- ...(input.InputFormatConfiguration !== undefined &&
1397
- input.InputFormatConfiguration !== null && {
1398
- InputFormatConfiguration: serializeAws_json1_1InputFormatConfiguration(input.InputFormatConfiguration, context),
1399
- }),
1400
- ...(input.OutputFormatConfiguration !== undefined &&
1401
- input.OutputFormatConfiguration !== null && {
1402
- OutputFormatConfiguration: serializeAws_json1_1OutputFormatConfiguration(
1403
- input.OutputFormatConfiguration,
1404
- context
1405
- ),
1406
- }),
1407
- ...(input.SchemaConfiguration !== undefined &&
1408
- input.SchemaConfiguration !== null && {
1409
- SchemaConfiguration: serializeAws_json1_1SchemaConfiguration(input.SchemaConfiguration, context),
1410
- }),
1411
- };
1412
- };
1413
-
1414
- const serializeAws_json1_1DeleteDeliveryStreamInput = (
1415
- input: DeleteDeliveryStreamInput,
1416
- context: __SerdeContext
1417
- ): any => {
1418
- return {
1419
- ...(input.AllowForceDelete !== undefined &&
1420
- input.AllowForceDelete !== null && { AllowForceDelete: input.AllowForceDelete }),
1421
- ...(input.DeliveryStreamName !== undefined &&
1422
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
1423
- };
1424
- };
1425
-
1426
- const serializeAws_json1_1DeliveryStreamEncryptionConfigurationInput = (
1427
- input: DeliveryStreamEncryptionConfigurationInput,
1428
- context: __SerdeContext
1429
- ): any => {
1430
- return {
1431
- ...(input.KeyARN !== undefined && input.KeyARN !== null && { KeyARN: input.KeyARN }),
1432
- ...(input.KeyType !== undefined && input.KeyType !== null && { KeyType: input.KeyType }),
1433
- };
1434
- };
1435
-
1436
- const serializeAws_json1_1DescribeDeliveryStreamInput = (
1437
- input: DescribeDeliveryStreamInput,
1438
- context: __SerdeContext
1439
- ): any => {
1440
- return {
1441
- ...(input.DeliveryStreamName !== undefined &&
1442
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
1443
- ...(input.ExclusiveStartDestinationId !== undefined &&
1444
- input.ExclusiveStartDestinationId !== null && { ExclusiveStartDestinationId: input.ExclusiveStartDestinationId }),
1445
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
1446
- };
1447
- };
1448
-
1449
- const serializeAws_json1_1Deserializer = (input: Deserializer, context: __SerdeContext): any => {
1450
- return {
1451
- ...(input.HiveJsonSerDe !== undefined &&
1452
- input.HiveJsonSerDe !== null && {
1453
- HiveJsonSerDe: serializeAws_json1_1HiveJsonSerDe(input.HiveJsonSerDe, context),
1454
- }),
1455
- ...(input.OpenXJsonSerDe !== undefined &&
1456
- input.OpenXJsonSerDe !== null && {
1457
- OpenXJsonSerDe: serializeAws_json1_1OpenXJsonSerDe(input.OpenXJsonSerDe, context),
1458
- }),
1459
- };
1460
- };
1461
-
1462
- const serializeAws_json1_1DynamicPartitioningConfiguration = (
1463
- input: DynamicPartitioningConfiguration,
1464
- context: __SerdeContext
1465
- ): any => {
1466
- return {
1467
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
1468
- ...(input.RetryOptions !== undefined &&
1469
- input.RetryOptions !== null && { RetryOptions: serializeAws_json1_1RetryOptions(input.RetryOptions, context) }),
1470
- };
1471
- };
1472
-
1473
- const serializeAws_json1_1ElasticsearchBufferingHints = (
1474
- input: ElasticsearchBufferingHints,
1475
- context: __SerdeContext
1476
- ): any => {
1477
- return {
1478
- ...(input.IntervalInSeconds !== undefined &&
1479
- input.IntervalInSeconds !== null && { IntervalInSeconds: input.IntervalInSeconds }),
1480
- ...(input.SizeInMBs !== undefined && input.SizeInMBs !== null && { SizeInMBs: input.SizeInMBs }),
1481
- };
1482
- };
1483
-
1484
- const serializeAws_json1_1ElasticsearchDestinationConfiguration = (
1485
- input: ElasticsearchDestinationConfiguration,
1486
- context: __SerdeContext
1487
- ): any => {
1488
- return {
1489
- ...(input.BufferingHints !== undefined &&
1490
- input.BufferingHints !== null && {
1491
- BufferingHints: serializeAws_json1_1ElasticsearchBufferingHints(input.BufferingHints, context),
1492
- }),
1493
- ...(input.CloudWatchLoggingOptions !== undefined &&
1494
- input.CloudWatchLoggingOptions !== null && {
1495
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
1496
- }),
1497
- ...(input.ClusterEndpoint !== undefined &&
1498
- input.ClusterEndpoint !== null && { ClusterEndpoint: input.ClusterEndpoint }),
1499
- ...(input.DomainARN !== undefined && input.DomainARN !== null && { DomainARN: input.DomainARN }),
1500
- ...(input.IndexName !== undefined && input.IndexName !== null && { IndexName: input.IndexName }),
1501
- ...(input.IndexRotationPeriod !== undefined &&
1502
- input.IndexRotationPeriod !== null && { IndexRotationPeriod: input.IndexRotationPeriod }),
1503
- ...(input.ProcessingConfiguration !== undefined &&
1504
- input.ProcessingConfiguration !== null && {
1505
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
1506
- }),
1507
- ...(input.RetryOptions !== undefined &&
1508
- input.RetryOptions !== null && {
1509
- RetryOptions: serializeAws_json1_1ElasticsearchRetryOptions(input.RetryOptions, context),
1510
- }),
1511
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
1512
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
1513
- ...(input.S3Configuration !== undefined &&
1514
- input.S3Configuration !== null && {
1515
- S3Configuration: serializeAws_json1_1S3DestinationConfiguration(input.S3Configuration, context),
1516
- }),
1517
- ...(input.TypeName !== undefined && input.TypeName !== null && { TypeName: input.TypeName }),
1518
- ...(input.VpcConfiguration !== undefined &&
1519
- input.VpcConfiguration !== null && {
1520
- VpcConfiguration: serializeAws_json1_1VpcConfiguration(input.VpcConfiguration, context),
1521
- }),
1522
- };
1523
- };
1524
-
1525
- const serializeAws_json1_1ElasticsearchDestinationUpdate = (
1526
- input: ElasticsearchDestinationUpdate,
1527
- context: __SerdeContext
1528
- ): any => {
1529
- return {
1530
- ...(input.BufferingHints !== undefined &&
1531
- input.BufferingHints !== null && {
1532
- BufferingHints: serializeAws_json1_1ElasticsearchBufferingHints(input.BufferingHints, context),
1533
- }),
1534
- ...(input.CloudWatchLoggingOptions !== undefined &&
1535
- input.CloudWatchLoggingOptions !== null && {
1536
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
1537
- }),
1538
- ...(input.ClusterEndpoint !== undefined &&
1539
- input.ClusterEndpoint !== null && { ClusterEndpoint: input.ClusterEndpoint }),
1540
- ...(input.DomainARN !== undefined && input.DomainARN !== null && { DomainARN: input.DomainARN }),
1541
- ...(input.IndexName !== undefined && input.IndexName !== null && { IndexName: input.IndexName }),
1542
- ...(input.IndexRotationPeriod !== undefined &&
1543
- input.IndexRotationPeriod !== null && { IndexRotationPeriod: input.IndexRotationPeriod }),
1544
- ...(input.ProcessingConfiguration !== undefined &&
1545
- input.ProcessingConfiguration !== null && {
1546
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
1547
- }),
1548
- ...(input.RetryOptions !== undefined &&
1549
- input.RetryOptions !== null && {
1550
- RetryOptions: serializeAws_json1_1ElasticsearchRetryOptions(input.RetryOptions, context),
1551
- }),
1552
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
1553
- ...(input.S3Update !== undefined &&
1554
- input.S3Update !== null && { S3Update: serializeAws_json1_1S3DestinationUpdate(input.S3Update, context) }),
1555
- ...(input.TypeName !== undefined && input.TypeName !== null && { TypeName: input.TypeName }),
1556
- };
1557
- };
1558
-
1559
- const serializeAws_json1_1ElasticsearchRetryOptions = (
1560
- input: ElasticsearchRetryOptions,
1561
- context: __SerdeContext
1562
- ): any => {
1563
- return {
1564
- ...(input.DurationInSeconds !== undefined &&
1565
- input.DurationInSeconds !== null && { DurationInSeconds: input.DurationInSeconds }),
1566
- };
1567
- };
1568
-
1569
- const serializeAws_json1_1EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => {
1570
- return {
1571
- ...(input.KMSEncryptionConfig !== undefined &&
1572
- input.KMSEncryptionConfig !== null && {
1573
- KMSEncryptionConfig: serializeAws_json1_1KMSEncryptionConfig(input.KMSEncryptionConfig, context),
1574
- }),
1575
- ...(input.NoEncryptionConfig !== undefined &&
1576
- input.NoEncryptionConfig !== null && { NoEncryptionConfig: input.NoEncryptionConfig }),
1577
- };
1578
- };
1579
-
1580
- const serializeAws_json1_1ExtendedS3DestinationConfiguration = (
1581
- input: ExtendedS3DestinationConfiguration,
1582
- context: __SerdeContext
1583
- ): any => {
1584
- return {
1585
- ...(input.BucketARN !== undefined && input.BucketARN !== null && { BucketARN: input.BucketARN }),
1586
- ...(input.BufferingHints !== undefined &&
1587
- input.BufferingHints !== null && {
1588
- BufferingHints: serializeAws_json1_1BufferingHints(input.BufferingHints, context),
1589
- }),
1590
- ...(input.CloudWatchLoggingOptions !== undefined &&
1591
- input.CloudWatchLoggingOptions !== null && {
1592
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
1593
- }),
1594
- ...(input.CompressionFormat !== undefined &&
1595
- input.CompressionFormat !== null && { CompressionFormat: input.CompressionFormat }),
1596
- ...(input.DataFormatConversionConfiguration !== undefined &&
1597
- input.DataFormatConversionConfiguration !== null && {
1598
- DataFormatConversionConfiguration: serializeAws_json1_1DataFormatConversionConfiguration(
1599
- input.DataFormatConversionConfiguration,
1600
- context
1601
- ),
1602
- }),
1603
- ...(input.DynamicPartitioningConfiguration !== undefined &&
1604
- input.DynamicPartitioningConfiguration !== null && {
1605
- DynamicPartitioningConfiguration: serializeAws_json1_1DynamicPartitioningConfiguration(
1606
- input.DynamicPartitioningConfiguration,
1607
- context
1608
- ),
1609
- }),
1610
- ...(input.EncryptionConfiguration !== undefined &&
1611
- input.EncryptionConfiguration !== null && {
1612
- EncryptionConfiguration: serializeAws_json1_1EncryptionConfiguration(input.EncryptionConfiguration, context),
1613
- }),
1614
- ...(input.ErrorOutputPrefix !== undefined &&
1615
- input.ErrorOutputPrefix !== null && { ErrorOutputPrefix: input.ErrorOutputPrefix }),
1616
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
1617
- ...(input.ProcessingConfiguration !== undefined &&
1618
- input.ProcessingConfiguration !== null && {
1619
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
1620
- }),
1621
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
1622
- ...(input.S3BackupConfiguration !== undefined &&
1623
- input.S3BackupConfiguration !== null && {
1624
- S3BackupConfiguration: serializeAws_json1_1S3DestinationConfiguration(input.S3BackupConfiguration, context),
1625
- }),
1626
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
1627
- };
1628
- };
1629
-
1630
- const serializeAws_json1_1ExtendedS3DestinationUpdate = (
1631
- input: ExtendedS3DestinationUpdate,
1632
- context: __SerdeContext
1633
- ): any => {
1634
- return {
1635
- ...(input.BucketARN !== undefined && input.BucketARN !== null && { BucketARN: input.BucketARN }),
1636
- ...(input.BufferingHints !== undefined &&
1637
- input.BufferingHints !== null && {
1638
- BufferingHints: serializeAws_json1_1BufferingHints(input.BufferingHints, context),
1639
- }),
1640
- ...(input.CloudWatchLoggingOptions !== undefined &&
1641
- input.CloudWatchLoggingOptions !== null && {
1642
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
1643
- }),
1644
- ...(input.CompressionFormat !== undefined &&
1645
- input.CompressionFormat !== null && { CompressionFormat: input.CompressionFormat }),
1646
- ...(input.DataFormatConversionConfiguration !== undefined &&
1647
- input.DataFormatConversionConfiguration !== null && {
1648
- DataFormatConversionConfiguration: serializeAws_json1_1DataFormatConversionConfiguration(
1649
- input.DataFormatConversionConfiguration,
1650
- context
1651
- ),
1652
- }),
1653
- ...(input.DynamicPartitioningConfiguration !== undefined &&
1654
- input.DynamicPartitioningConfiguration !== null && {
1655
- DynamicPartitioningConfiguration: serializeAws_json1_1DynamicPartitioningConfiguration(
1656
- input.DynamicPartitioningConfiguration,
1657
- context
1658
- ),
1659
- }),
1660
- ...(input.EncryptionConfiguration !== undefined &&
1661
- input.EncryptionConfiguration !== null && {
1662
- EncryptionConfiguration: serializeAws_json1_1EncryptionConfiguration(input.EncryptionConfiguration, context),
1663
- }),
1664
- ...(input.ErrorOutputPrefix !== undefined &&
1665
- input.ErrorOutputPrefix !== null && { ErrorOutputPrefix: input.ErrorOutputPrefix }),
1666
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
1667
- ...(input.ProcessingConfiguration !== undefined &&
1668
- input.ProcessingConfiguration !== null && {
1669
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
1670
- }),
1671
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
1672
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
1673
- ...(input.S3BackupUpdate !== undefined &&
1674
- input.S3BackupUpdate !== null && {
1675
- S3BackupUpdate: serializeAws_json1_1S3DestinationUpdate(input.S3BackupUpdate, context),
1676
- }),
1677
- };
1678
- };
1679
-
1680
- const serializeAws_json1_1HiveJsonSerDe = (input: HiveJsonSerDe, context: __SerdeContext): any => {
1681
- return {
1682
- ...(input.TimestampFormats !== undefined &&
1683
- input.TimestampFormats !== null && {
1684
- TimestampFormats: serializeAws_json1_1ListOfNonEmptyStrings(input.TimestampFormats, context),
1685
- }),
1686
- };
1687
- };
1688
-
1689
- const serializeAws_json1_1HttpEndpointBufferingHints = (
1690
- input: HttpEndpointBufferingHints,
1691
- context: __SerdeContext
1692
- ): any => {
1693
- return {
1694
- ...(input.IntervalInSeconds !== undefined &&
1695
- input.IntervalInSeconds !== null && { IntervalInSeconds: input.IntervalInSeconds }),
1696
- ...(input.SizeInMBs !== undefined && input.SizeInMBs !== null && { SizeInMBs: input.SizeInMBs }),
1697
- };
1698
- };
1699
-
1700
- const serializeAws_json1_1HttpEndpointCommonAttribute = (
1701
- input: HttpEndpointCommonAttribute,
1702
- context: __SerdeContext
1703
- ): any => {
1704
- return {
1705
- ...(input.AttributeName !== undefined && input.AttributeName !== null && { AttributeName: input.AttributeName }),
1706
- ...(input.AttributeValue !== undefined &&
1707
- input.AttributeValue !== null && { AttributeValue: input.AttributeValue }),
1708
- };
1709
- };
1710
-
1711
- const serializeAws_json1_1HttpEndpointCommonAttributesList = (
1712
- input: HttpEndpointCommonAttribute[],
1713
- context: __SerdeContext
1714
- ): any => {
1715
- return input
1716
- .filter((e: any) => e != null)
1717
- .map((entry) => {
1718
- if (entry === null) {
1719
- return null as any;
1720
- }
1721
- return serializeAws_json1_1HttpEndpointCommonAttribute(entry, context);
1722
- });
1723
- };
1724
-
1725
- const serializeAws_json1_1HttpEndpointConfiguration = (
1726
- input: HttpEndpointConfiguration,
1727
- context: __SerdeContext
1728
- ): any => {
1729
- return {
1730
- ...(input.AccessKey !== undefined && input.AccessKey !== null && { AccessKey: input.AccessKey }),
1731
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1732
- ...(input.Url !== undefined && input.Url !== null && { Url: input.Url }),
1733
- };
1734
- };
1735
-
1736
- const serializeAws_json1_1HttpEndpointDestinationConfiguration = (
1737
- input: HttpEndpointDestinationConfiguration,
1738
- context: __SerdeContext
1739
- ): any => {
1740
- return {
1741
- ...(input.BufferingHints !== undefined &&
1742
- input.BufferingHints !== null && {
1743
- BufferingHints: serializeAws_json1_1HttpEndpointBufferingHints(input.BufferingHints, context),
1744
- }),
1745
- ...(input.CloudWatchLoggingOptions !== undefined &&
1746
- input.CloudWatchLoggingOptions !== null && {
1747
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
1748
- }),
1749
- ...(input.EndpointConfiguration !== undefined &&
1750
- input.EndpointConfiguration !== null && {
1751
- EndpointConfiguration: serializeAws_json1_1HttpEndpointConfiguration(input.EndpointConfiguration, context),
1752
- }),
1753
- ...(input.ProcessingConfiguration !== undefined &&
1754
- input.ProcessingConfiguration !== null && {
1755
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
1756
- }),
1757
- ...(input.RequestConfiguration !== undefined &&
1758
- input.RequestConfiguration !== null && {
1759
- RequestConfiguration: serializeAws_json1_1HttpEndpointRequestConfiguration(input.RequestConfiguration, context),
1760
- }),
1761
- ...(input.RetryOptions !== undefined &&
1762
- input.RetryOptions !== null && {
1763
- RetryOptions: serializeAws_json1_1HttpEndpointRetryOptions(input.RetryOptions, context),
1764
- }),
1765
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
1766
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
1767
- ...(input.S3Configuration !== undefined &&
1768
- input.S3Configuration !== null && {
1769
- S3Configuration: serializeAws_json1_1S3DestinationConfiguration(input.S3Configuration, context),
1770
- }),
1771
- };
1772
- };
1773
-
1774
- const serializeAws_json1_1HttpEndpointDestinationUpdate = (
1775
- input: HttpEndpointDestinationUpdate,
1776
- context: __SerdeContext
1777
- ): any => {
1778
- return {
1779
- ...(input.BufferingHints !== undefined &&
1780
- input.BufferingHints !== null && {
1781
- BufferingHints: serializeAws_json1_1HttpEndpointBufferingHints(input.BufferingHints, context),
1782
- }),
1783
- ...(input.CloudWatchLoggingOptions !== undefined &&
1784
- input.CloudWatchLoggingOptions !== null && {
1785
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
1786
- }),
1787
- ...(input.EndpointConfiguration !== undefined &&
1788
- input.EndpointConfiguration !== null && {
1789
- EndpointConfiguration: serializeAws_json1_1HttpEndpointConfiguration(input.EndpointConfiguration, context),
1790
- }),
1791
- ...(input.ProcessingConfiguration !== undefined &&
1792
- input.ProcessingConfiguration !== null && {
1793
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
1794
- }),
1795
- ...(input.RequestConfiguration !== undefined &&
1796
- input.RequestConfiguration !== null && {
1797
- RequestConfiguration: serializeAws_json1_1HttpEndpointRequestConfiguration(input.RequestConfiguration, context),
1798
- }),
1799
- ...(input.RetryOptions !== undefined &&
1800
- input.RetryOptions !== null && {
1801
- RetryOptions: serializeAws_json1_1HttpEndpointRetryOptions(input.RetryOptions, context),
1802
- }),
1803
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
1804
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
1805
- ...(input.S3Update !== undefined &&
1806
- input.S3Update !== null && { S3Update: serializeAws_json1_1S3DestinationUpdate(input.S3Update, context) }),
1807
- };
1808
- };
1809
-
1810
- const serializeAws_json1_1HttpEndpointRequestConfiguration = (
1811
- input: HttpEndpointRequestConfiguration,
1812
- context: __SerdeContext
1813
- ): any => {
1814
- return {
1815
- ...(input.CommonAttributes !== undefined &&
1816
- input.CommonAttributes !== null && {
1817
- CommonAttributes: serializeAws_json1_1HttpEndpointCommonAttributesList(input.CommonAttributes, context),
1818
- }),
1819
- ...(input.ContentEncoding !== undefined &&
1820
- input.ContentEncoding !== null && { ContentEncoding: input.ContentEncoding }),
1821
- };
1822
- };
1823
-
1824
- const serializeAws_json1_1HttpEndpointRetryOptions = (
1825
- input: HttpEndpointRetryOptions,
1826
- context: __SerdeContext
1827
- ): any => {
1828
- return {
1829
- ...(input.DurationInSeconds !== undefined &&
1830
- input.DurationInSeconds !== null && { DurationInSeconds: input.DurationInSeconds }),
1831
- };
1832
- };
1833
-
1834
- const serializeAws_json1_1InputFormatConfiguration = (
1835
- input: InputFormatConfiguration,
1836
- context: __SerdeContext
1837
- ): any => {
1838
- return {
1839
- ...(input.Deserializer !== undefined &&
1840
- input.Deserializer !== null && { Deserializer: serializeAws_json1_1Deserializer(input.Deserializer, context) }),
1841
- };
1842
- };
1843
-
1844
- const serializeAws_json1_1KinesisStreamSourceConfiguration = (
1845
- input: KinesisStreamSourceConfiguration,
1846
- context: __SerdeContext
1847
- ): any => {
1848
- return {
1849
- ...(input.KinesisStreamARN !== undefined &&
1850
- input.KinesisStreamARN !== null && { KinesisStreamARN: input.KinesisStreamARN }),
1851
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
1852
- };
1853
- };
1854
-
1855
- const serializeAws_json1_1KMSEncryptionConfig = (input: KMSEncryptionConfig, context: __SerdeContext): any => {
1856
- return {
1857
- ...(input.AWSKMSKeyARN !== undefined && input.AWSKMSKeyARN !== null && { AWSKMSKeyARN: input.AWSKMSKeyARN }),
1858
- };
1859
- };
1860
-
1861
- const serializeAws_json1_1ListDeliveryStreamsInput = (
1862
- input: ListDeliveryStreamsInput,
1863
- context: __SerdeContext
1864
- ): any => {
1865
- return {
1866
- ...(input.DeliveryStreamType !== undefined &&
1867
- input.DeliveryStreamType !== null && { DeliveryStreamType: input.DeliveryStreamType }),
1868
- ...(input.ExclusiveStartDeliveryStreamName !== undefined &&
1869
- input.ExclusiveStartDeliveryStreamName !== null && {
1870
- ExclusiveStartDeliveryStreamName: input.ExclusiveStartDeliveryStreamName,
1871
- }),
1872
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
1873
- };
1874
- };
1875
-
1876
- const serializeAws_json1_1ListOfNonEmptyStrings = (input: string[], context: __SerdeContext): any => {
1877
- return input
1878
- .filter((e: any) => e != null)
1879
- .map((entry) => {
1880
- if (entry === null) {
1881
- return null as any;
1882
- }
1883
- return entry;
1884
- });
1885
- };
1886
-
1887
- const serializeAws_json1_1ListOfNonEmptyStringsWithoutWhitespace = (input: string[], context: __SerdeContext): any => {
1888
- return input
1889
- .filter((e: any) => e != null)
1890
- .map((entry) => {
1891
- if (entry === null) {
1892
- return null as any;
1893
- }
1894
- return entry;
1895
- });
1896
- };
1897
-
1898
- const serializeAws_json1_1ListTagsForDeliveryStreamInput = (
1899
- input: ListTagsForDeliveryStreamInput,
1900
- context: __SerdeContext
1901
- ): any => {
1902
- return {
1903
- ...(input.DeliveryStreamName !== undefined &&
1904
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
1905
- ...(input.ExclusiveStartTagKey !== undefined &&
1906
- input.ExclusiveStartTagKey !== null && { ExclusiveStartTagKey: input.ExclusiveStartTagKey }),
1907
- ...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
1908
- };
1909
- };
1910
-
1911
- const serializeAws_json1_1OpenXJsonSerDe = (input: OpenXJsonSerDe, context: __SerdeContext): any => {
1912
- return {
1913
- ...(input.CaseInsensitive !== undefined &&
1914
- input.CaseInsensitive !== null && { CaseInsensitive: input.CaseInsensitive }),
1915
- ...(input.ColumnToJsonKeyMappings !== undefined &&
1916
- input.ColumnToJsonKeyMappings !== null && {
1917
- ColumnToJsonKeyMappings: serializeAws_json1_1ColumnToJsonKeyMappings(input.ColumnToJsonKeyMappings, context),
1918
- }),
1919
- ...(input.ConvertDotsInJsonKeysToUnderscores !== undefined &&
1920
- input.ConvertDotsInJsonKeysToUnderscores !== null && {
1921
- ConvertDotsInJsonKeysToUnderscores: input.ConvertDotsInJsonKeysToUnderscores,
1922
- }),
1923
- };
1924
- };
1925
-
1926
- const serializeAws_json1_1OrcSerDe = (input: OrcSerDe, context: __SerdeContext): any => {
1927
- return {
1928
- ...(input.BlockSizeBytes !== undefined &&
1929
- input.BlockSizeBytes !== null && { BlockSizeBytes: input.BlockSizeBytes }),
1930
- ...(input.BloomFilterColumns !== undefined &&
1931
- input.BloomFilterColumns !== null && {
1932
- BloomFilterColumns: serializeAws_json1_1ListOfNonEmptyStringsWithoutWhitespace(
1933
- input.BloomFilterColumns,
1934
- context
1935
- ),
1936
- }),
1937
- ...(input.BloomFilterFalsePositiveProbability !== undefined &&
1938
- input.BloomFilterFalsePositiveProbability !== null && {
1939
- BloomFilterFalsePositiveProbability: __serializeFloat(input.BloomFilterFalsePositiveProbability),
1940
- }),
1941
- ...(input.Compression !== undefined && input.Compression !== null && { Compression: input.Compression }),
1942
- ...(input.DictionaryKeyThreshold !== undefined &&
1943
- input.DictionaryKeyThreshold !== null && {
1944
- DictionaryKeyThreshold: __serializeFloat(input.DictionaryKeyThreshold),
1945
- }),
1946
- ...(input.EnablePadding !== undefined && input.EnablePadding !== null && { EnablePadding: input.EnablePadding }),
1947
- ...(input.FormatVersion !== undefined && input.FormatVersion !== null && { FormatVersion: input.FormatVersion }),
1948
- ...(input.PaddingTolerance !== undefined &&
1949
- input.PaddingTolerance !== null && { PaddingTolerance: __serializeFloat(input.PaddingTolerance) }),
1950
- ...(input.RowIndexStride !== undefined &&
1951
- input.RowIndexStride !== null && { RowIndexStride: input.RowIndexStride }),
1952
- ...(input.StripeSizeBytes !== undefined &&
1953
- input.StripeSizeBytes !== null && { StripeSizeBytes: input.StripeSizeBytes }),
1954
- };
1955
- };
1956
-
1957
- const serializeAws_json1_1OutputFormatConfiguration = (
1958
- input: OutputFormatConfiguration,
1959
- context: __SerdeContext
1960
- ): any => {
1961
- return {
1962
- ...(input.Serializer !== undefined &&
1963
- input.Serializer !== null && { Serializer: serializeAws_json1_1Serializer(input.Serializer, context) }),
1964
- };
1965
- };
1966
-
1967
- const serializeAws_json1_1ParquetSerDe = (input: ParquetSerDe, context: __SerdeContext): any => {
1968
- return {
1969
- ...(input.BlockSizeBytes !== undefined &&
1970
- input.BlockSizeBytes !== null && { BlockSizeBytes: input.BlockSizeBytes }),
1971
- ...(input.Compression !== undefined && input.Compression !== null && { Compression: input.Compression }),
1972
- ...(input.EnableDictionaryCompression !== undefined &&
1973
- input.EnableDictionaryCompression !== null && { EnableDictionaryCompression: input.EnableDictionaryCompression }),
1974
- ...(input.MaxPaddingBytes !== undefined &&
1975
- input.MaxPaddingBytes !== null && { MaxPaddingBytes: input.MaxPaddingBytes }),
1976
- ...(input.PageSizeBytes !== undefined && input.PageSizeBytes !== null && { PageSizeBytes: input.PageSizeBytes }),
1977
- ...(input.WriterVersion !== undefined && input.WriterVersion !== null && { WriterVersion: input.WriterVersion }),
1978
- };
1979
- };
1980
-
1981
- const serializeAws_json1_1ProcessingConfiguration = (input: ProcessingConfiguration, context: __SerdeContext): any => {
1982
- return {
1983
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
1984
- ...(input.Processors !== undefined &&
1985
- input.Processors !== null && { Processors: serializeAws_json1_1ProcessorList(input.Processors, context) }),
1986
- };
1987
- };
1988
-
1989
- const serializeAws_json1_1Processor = (input: Processor, context: __SerdeContext): any => {
1990
- return {
1991
- ...(input.Parameters !== undefined &&
1992
- input.Parameters !== null && {
1993
- Parameters: serializeAws_json1_1ProcessorParameterList(input.Parameters, context),
1994
- }),
1995
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
1996
- };
1997
- };
1998
-
1999
- const serializeAws_json1_1ProcessorList = (input: Processor[], context: __SerdeContext): any => {
2000
- return input
2001
- .filter((e: any) => e != null)
2002
- .map((entry) => {
2003
- if (entry === null) {
2004
- return null as any;
2005
- }
2006
- return serializeAws_json1_1Processor(entry, context);
2007
- });
2008
- };
2009
-
2010
- const serializeAws_json1_1ProcessorParameter = (input: ProcessorParameter, context: __SerdeContext): any => {
2011
- return {
2012
- ...(input.ParameterName !== undefined && input.ParameterName !== null && { ParameterName: input.ParameterName }),
2013
- ...(input.ParameterValue !== undefined &&
2014
- input.ParameterValue !== null && { ParameterValue: input.ParameterValue }),
2015
- };
2016
- };
2017
-
2018
- const serializeAws_json1_1ProcessorParameterList = (input: ProcessorParameter[], context: __SerdeContext): any => {
2019
- return input
2020
- .filter((e: any) => e != null)
2021
- .map((entry) => {
2022
- if (entry === null) {
2023
- return null as any;
2024
- }
2025
- return serializeAws_json1_1ProcessorParameter(entry, context);
2026
- });
2027
- };
2028
-
2029
- const serializeAws_json1_1PutRecordBatchInput = (input: PutRecordBatchInput, context: __SerdeContext): any => {
2030
- return {
2031
- ...(input.DeliveryStreamName !== undefined &&
2032
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
2033
- ...(input.Records !== undefined &&
2034
- input.Records !== null && {
2035
- Records: serializeAws_json1_1PutRecordBatchRequestEntryList(input.Records, context),
2036
- }),
2037
- };
2038
- };
2039
-
2040
- const serializeAws_json1_1PutRecordBatchRequestEntryList = (input: _Record[], context: __SerdeContext): any => {
2041
- return input
2042
- .filter((e: any) => e != null)
2043
- .map((entry) => {
2044
- if (entry === null) {
2045
- return null as any;
2046
- }
2047
- return serializeAws_json1_1_Record(entry, context);
2048
- });
2049
- };
2050
-
2051
- const serializeAws_json1_1PutRecordInput = (input: PutRecordInput, context: __SerdeContext): any => {
2052
- return {
2053
- ...(input.DeliveryStreamName !== undefined &&
2054
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
2055
- ...(input.Record !== undefined &&
2056
- input.Record !== null && { Record: serializeAws_json1_1_Record(input.Record, context) }),
2057
- };
2058
- };
2059
-
2060
- const serializeAws_json1_1_Record = (input: _Record, context: __SerdeContext): any => {
2061
- return {
2062
- ...(input.Data !== undefined && input.Data !== null && { Data: context.base64Encoder(input.Data) }),
2063
- };
2064
- };
2065
-
2066
- const serializeAws_json1_1RedshiftDestinationConfiguration = (
2067
- input: RedshiftDestinationConfiguration,
2068
- context: __SerdeContext
2069
- ): any => {
2070
- return {
2071
- ...(input.CloudWatchLoggingOptions !== undefined &&
2072
- input.CloudWatchLoggingOptions !== null && {
2073
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
2074
- }),
2075
- ...(input.ClusterJDBCURL !== undefined &&
2076
- input.ClusterJDBCURL !== null && { ClusterJDBCURL: input.ClusterJDBCURL }),
2077
- ...(input.CopyCommand !== undefined &&
2078
- input.CopyCommand !== null && { CopyCommand: serializeAws_json1_1CopyCommand(input.CopyCommand, context) }),
2079
- ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }),
2080
- ...(input.ProcessingConfiguration !== undefined &&
2081
- input.ProcessingConfiguration !== null && {
2082
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
2083
- }),
2084
- ...(input.RetryOptions !== undefined &&
2085
- input.RetryOptions !== null && {
2086
- RetryOptions: serializeAws_json1_1RedshiftRetryOptions(input.RetryOptions, context),
2087
- }),
2088
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
2089
- ...(input.S3BackupConfiguration !== undefined &&
2090
- input.S3BackupConfiguration !== null && {
2091
- S3BackupConfiguration: serializeAws_json1_1S3DestinationConfiguration(input.S3BackupConfiguration, context),
2092
- }),
2093
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
2094
- ...(input.S3Configuration !== undefined &&
2095
- input.S3Configuration !== null && {
2096
- S3Configuration: serializeAws_json1_1S3DestinationConfiguration(input.S3Configuration, context),
2097
- }),
2098
- ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }),
2099
- };
2100
- };
2101
-
2102
- const serializeAws_json1_1RedshiftDestinationUpdate = (
2103
- input: RedshiftDestinationUpdate,
2104
- context: __SerdeContext
2105
- ): any => {
2106
- return {
2107
- ...(input.CloudWatchLoggingOptions !== undefined &&
2108
- input.CloudWatchLoggingOptions !== null && {
2109
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
2110
- }),
2111
- ...(input.ClusterJDBCURL !== undefined &&
2112
- input.ClusterJDBCURL !== null && { ClusterJDBCURL: input.ClusterJDBCURL }),
2113
- ...(input.CopyCommand !== undefined &&
2114
- input.CopyCommand !== null && { CopyCommand: serializeAws_json1_1CopyCommand(input.CopyCommand, context) }),
2115
- ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }),
2116
- ...(input.ProcessingConfiguration !== undefined &&
2117
- input.ProcessingConfiguration !== null && {
2118
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
2119
- }),
2120
- ...(input.RetryOptions !== undefined &&
2121
- input.RetryOptions !== null && {
2122
- RetryOptions: serializeAws_json1_1RedshiftRetryOptions(input.RetryOptions, context),
2123
- }),
2124
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
2125
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
2126
- ...(input.S3BackupUpdate !== undefined &&
2127
- input.S3BackupUpdate !== null && {
2128
- S3BackupUpdate: serializeAws_json1_1S3DestinationUpdate(input.S3BackupUpdate, context),
2129
- }),
2130
- ...(input.S3Update !== undefined &&
2131
- input.S3Update !== null && { S3Update: serializeAws_json1_1S3DestinationUpdate(input.S3Update, context) }),
2132
- ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }),
2133
- };
2134
- };
2135
-
2136
- const serializeAws_json1_1RedshiftRetryOptions = (input: RedshiftRetryOptions, context: __SerdeContext): any => {
2137
- return {
2138
- ...(input.DurationInSeconds !== undefined &&
2139
- input.DurationInSeconds !== null && { DurationInSeconds: input.DurationInSeconds }),
2140
- };
2141
- };
2142
-
2143
- const serializeAws_json1_1RetryOptions = (input: RetryOptions, context: __SerdeContext): any => {
2144
- return {
2145
- ...(input.DurationInSeconds !== undefined &&
2146
- input.DurationInSeconds !== null && { DurationInSeconds: input.DurationInSeconds }),
2147
- };
2148
- };
2149
-
2150
- const serializeAws_json1_1S3DestinationConfiguration = (
2151
- input: S3DestinationConfiguration,
2152
- context: __SerdeContext
2153
- ): any => {
2154
- return {
2155
- ...(input.BucketARN !== undefined && input.BucketARN !== null && { BucketARN: input.BucketARN }),
2156
- ...(input.BufferingHints !== undefined &&
2157
- input.BufferingHints !== null && {
2158
- BufferingHints: serializeAws_json1_1BufferingHints(input.BufferingHints, context),
2159
- }),
2160
- ...(input.CloudWatchLoggingOptions !== undefined &&
2161
- input.CloudWatchLoggingOptions !== null && {
2162
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
2163
- }),
2164
- ...(input.CompressionFormat !== undefined &&
2165
- input.CompressionFormat !== null && { CompressionFormat: input.CompressionFormat }),
2166
- ...(input.EncryptionConfiguration !== undefined &&
2167
- input.EncryptionConfiguration !== null && {
2168
- EncryptionConfiguration: serializeAws_json1_1EncryptionConfiguration(input.EncryptionConfiguration, context),
2169
- }),
2170
- ...(input.ErrorOutputPrefix !== undefined &&
2171
- input.ErrorOutputPrefix !== null && { ErrorOutputPrefix: input.ErrorOutputPrefix }),
2172
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
2173
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
2174
- };
2175
- };
2176
-
2177
- const serializeAws_json1_1S3DestinationUpdate = (input: S3DestinationUpdate, context: __SerdeContext): any => {
2178
- return {
2179
- ...(input.BucketARN !== undefined && input.BucketARN !== null && { BucketARN: input.BucketARN }),
2180
- ...(input.BufferingHints !== undefined &&
2181
- input.BufferingHints !== null && {
2182
- BufferingHints: serializeAws_json1_1BufferingHints(input.BufferingHints, context),
2183
- }),
2184
- ...(input.CloudWatchLoggingOptions !== undefined &&
2185
- input.CloudWatchLoggingOptions !== null && {
2186
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
2187
- }),
2188
- ...(input.CompressionFormat !== undefined &&
2189
- input.CompressionFormat !== null && { CompressionFormat: input.CompressionFormat }),
2190
- ...(input.EncryptionConfiguration !== undefined &&
2191
- input.EncryptionConfiguration !== null && {
2192
- EncryptionConfiguration: serializeAws_json1_1EncryptionConfiguration(input.EncryptionConfiguration, context),
2193
- }),
2194
- ...(input.ErrorOutputPrefix !== undefined &&
2195
- input.ErrorOutputPrefix !== null && { ErrorOutputPrefix: input.ErrorOutputPrefix }),
2196
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
2197
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
2198
- };
2199
- };
2200
-
2201
- const serializeAws_json1_1SchemaConfiguration = (input: SchemaConfiguration, context: __SerdeContext): any => {
2202
- return {
2203
- ...(input.CatalogId !== undefined && input.CatalogId !== null && { CatalogId: input.CatalogId }),
2204
- ...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
2205
- ...(input.Region !== undefined && input.Region !== null && { Region: input.Region }),
2206
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
2207
- ...(input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }),
2208
- ...(input.VersionId !== undefined && input.VersionId !== null && { VersionId: input.VersionId }),
2209
- };
2210
- };
2211
-
2212
- const serializeAws_json1_1SecurityGroupIdList = (input: string[], context: __SerdeContext): any => {
2213
- return input
2214
- .filter((e: any) => e != null)
2215
- .map((entry) => {
2216
- if (entry === null) {
2217
- return null as any;
2218
- }
2219
- return entry;
2220
- });
2221
- };
2222
-
2223
- const serializeAws_json1_1Serializer = (input: Serializer, context: __SerdeContext): any => {
2224
- return {
2225
- ...(input.OrcSerDe !== undefined &&
2226
- input.OrcSerDe !== null && { OrcSerDe: serializeAws_json1_1OrcSerDe(input.OrcSerDe, context) }),
2227
- ...(input.ParquetSerDe !== undefined &&
2228
- input.ParquetSerDe !== null && { ParquetSerDe: serializeAws_json1_1ParquetSerDe(input.ParquetSerDe, context) }),
2229
- };
2230
- };
2231
-
2232
- const serializeAws_json1_1SplunkDestinationConfiguration = (
2233
- input: SplunkDestinationConfiguration,
2234
- context: __SerdeContext
2235
- ): any => {
2236
- return {
2237
- ...(input.CloudWatchLoggingOptions !== undefined &&
2238
- input.CloudWatchLoggingOptions !== null && {
2239
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
2240
- }),
2241
- ...(input.HECAcknowledgmentTimeoutInSeconds !== undefined &&
2242
- input.HECAcknowledgmentTimeoutInSeconds !== null && {
2243
- HECAcknowledgmentTimeoutInSeconds: input.HECAcknowledgmentTimeoutInSeconds,
2244
- }),
2245
- ...(input.HECEndpoint !== undefined && input.HECEndpoint !== null && { HECEndpoint: input.HECEndpoint }),
2246
- ...(input.HECEndpointType !== undefined &&
2247
- input.HECEndpointType !== null && { HECEndpointType: input.HECEndpointType }),
2248
- ...(input.HECToken !== undefined && input.HECToken !== null && { HECToken: input.HECToken }),
2249
- ...(input.ProcessingConfiguration !== undefined &&
2250
- input.ProcessingConfiguration !== null && {
2251
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
2252
- }),
2253
- ...(input.RetryOptions !== undefined &&
2254
- input.RetryOptions !== null && {
2255
- RetryOptions: serializeAws_json1_1SplunkRetryOptions(input.RetryOptions, context),
2256
- }),
2257
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
2258
- ...(input.S3Configuration !== undefined &&
2259
- input.S3Configuration !== null && {
2260
- S3Configuration: serializeAws_json1_1S3DestinationConfiguration(input.S3Configuration, context),
2261
- }),
2262
- };
2263
- };
2264
-
2265
- const serializeAws_json1_1SplunkDestinationUpdate = (input: SplunkDestinationUpdate, context: __SerdeContext): any => {
2266
- return {
2267
- ...(input.CloudWatchLoggingOptions !== undefined &&
2268
- input.CloudWatchLoggingOptions !== null && {
2269
- CloudWatchLoggingOptions: serializeAws_json1_1CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context),
2270
- }),
2271
- ...(input.HECAcknowledgmentTimeoutInSeconds !== undefined &&
2272
- input.HECAcknowledgmentTimeoutInSeconds !== null && {
2273
- HECAcknowledgmentTimeoutInSeconds: input.HECAcknowledgmentTimeoutInSeconds,
2274
- }),
2275
- ...(input.HECEndpoint !== undefined && input.HECEndpoint !== null && { HECEndpoint: input.HECEndpoint }),
2276
- ...(input.HECEndpointType !== undefined &&
2277
- input.HECEndpointType !== null && { HECEndpointType: input.HECEndpointType }),
2278
- ...(input.HECToken !== undefined && input.HECToken !== null && { HECToken: input.HECToken }),
2279
- ...(input.ProcessingConfiguration !== undefined &&
2280
- input.ProcessingConfiguration !== null && {
2281
- ProcessingConfiguration: serializeAws_json1_1ProcessingConfiguration(input.ProcessingConfiguration, context),
2282
- }),
2283
- ...(input.RetryOptions !== undefined &&
2284
- input.RetryOptions !== null && {
2285
- RetryOptions: serializeAws_json1_1SplunkRetryOptions(input.RetryOptions, context),
2286
- }),
2287
- ...(input.S3BackupMode !== undefined && input.S3BackupMode !== null && { S3BackupMode: input.S3BackupMode }),
2288
- ...(input.S3Update !== undefined &&
2289
- input.S3Update !== null && { S3Update: serializeAws_json1_1S3DestinationUpdate(input.S3Update, context) }),
2290
- };
2291
- };
2292
-
2293
- const serializeAws_json1_1SplunkRetryOptions = (input: SplunkRetryOptions, context: __SerdeContext): any => {
2294
- return {
2295
- ...(input.DurationInSeconds !== undefined &&
2296
- input.DurationInSeconds !== null && { DurationInSeconds: input.DurationInSeconds }),
2297
- };
2298
- };
2299
-
2300
- const serializeAws_json1_1StartDeliveryStreamEncryptionInput = (
2301
- input: StartDeliveryStreamEncryptionInput,
2302
- context: __SerdeContext
2303
- ): any => {
2304
- return {
2305
- ...(input.DeliveryStreamEncryptionConfigurationInput !== undefined &&
2306
- input.DeliveryStreamEncryptionConfigurationInput !== null && {
2307
- DeliveryStreamEncryptionConfigurationInput: serializeAws_json1_1DeliveryStreamEncryptionConfigurationInput(
2308
- input.DeliveryStreamEncryptionConfigurationInput,
2309
- context
2310
- ),
2311
- }),
2312
- ...(input.DeliveryStreamName !== undefined &&
2313
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
2314
- };
2315
- };
2316
-
2317
- const serializeAws_json1_1StopDeliveryStreamEncryptionInput = (
2318
- input: StopDeliveryStreamEncryptionInput,
2319
- context: __SerdeContext
2320
- ): any => {
2321
- return {
2322
- ...(input.DeliveryStreamName !== undefined &&
2323
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
2324
- };
2325
- };
2326
-
2327
- const serializeAws_json1_1SubnetIdList = (input: string[], context: __SerdeContext): any => {
2328
- return input
2329
- .filter((e: any) => e != null)
2330
- .map((entry) => {
2331
- if (entry === null) {
2332
- return null as any;
2333
- }
2334
- return entry;
2335
- });
2336
- };
2337
-
2338
- const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
2339
- return {
2340
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
2341
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
2342
- };
2343
- };
2344
-
2345
- const serializeAws_json1_1TagDeliveryStreamInput = (input: TagDeliveryStreamInput, context: __SerdeContext): any => {
2346
- return {
2347
- ...(input.DeliveryStreamName !== undefined &&
2348
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
2349
- ...(input.Tags !== undefined &&
2350
- input.Tags !== null && { Tags: serializeAws_json1_1TagDeliveryStreamInputTagList(input.Tags, context) }),
2351
- };
2352
- };
2353
-
2354
- const serializeAws_json1_1TagDeliveryStreamInputTagList = (input: Tag[], context: __SerdeContext): any => {
2355
- return input
2356
- .filter((e: any) => e != null)
2357
- .map((entry) => {
2358
- if (entry === null) {
2359
- return null as any;
2360
- }
2361
- return serializeAws_json1_1Tag(entry, context);
2362
- });
2363
- };
2364
-
2365
- const serializeAws_json1_1TagKeyList = (input: string[], context: __SerdeContext): any => {
2366
- return input
2367
- .filter((e: any) => e != null)
2368
- .map((entry) => {
2369
- if (entry === null) {
2370
- return null as any;
2371
- }
2372
- return entry;
2373
- });
2374
- };
2375
-
2376
- const serializeAws_json1_1UntagDeliveryStreamInput = (
2377
- input: UntagDeliveryStreamInput,
2378
- context: __SerdeContext
2379
- ): any => {
2380
- return {
2381
- ...(input.DeliveryStreamName !== undefined &&
2382
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
2383
- ...(input.TagKeys !== undefined &&
2384
- input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
2385
- };
2386
- };
2387
-
2388
- const serializeAws_json1_1UpdateDestinationInput = (input: UpdateDestinationInput, context: __SerdeContext): any => {
2389
- return {
2390
- ...(input.CurrentDeliveryStreamVersionId !== undefined &&
2391
- input.CurrentDeliveryStreamVersionId !== null && {
2392
- CurrentDeliveryStreamVersionId: input.CurrentDeliveryStreamVersionId,
2393
- }),
2394
- ...(input.DeliveryStreamName !== undefined &&
2395
- input.DeliveryStreamName !== null && { DeliveryStreamName: input.DeliveryStreamName }),
2396
- ...(input.DestinationId !== undefined && input.DestinationId !== null && { DestinationId: input.DestinationId }),
2397
- ...(input.ElasticsearchDestinationUpdate !== undefined &&
2398
- input.ElasticsearchDestinationUpdate !== null && {
2399
- ElasticsearchDestinationUpdate: serializeAws_json1_1ElasticsearchDestinationUpdate(
2400
- input.ElasticsearchDestinationUpdate,
2401
- context
2402
- ),
2403
- }),
2404
- ...(input.ExtendedS3DestinationUpdate !== undefined &&
2405
- input.ExtendedS3DestinationUpdate !== null && {
2406
- ExtendedS3DestinationUpdate: serializeAws_json1_1ExtendedS3DestinationUpdate(
2407
- input.ExtendedS3DestinationUpdate,
2408
- context
2409
- ),
2410
- }),
2411
- ...(input.HttpEndpointDestinationUpdate !== undefined &&
2412
- input.HttpEndpointDestinationUpdate !== null && {
2413
- HttpEndpointDestinationUpdate: serializeAws_json1_1HttpEndpointDestinationUpdate(
2414
- input.HttpEndpointDestinationUpdate,
2415
- context
2416
- ),
2417
- }),
2418
- ...(input.RedshiftDestinationUpdate !== undefined &&
2419
- input.RedshiftDestinationUpdate !== null && {
2420
- RedshiftDestinationUpdate: serializeAws_json1_1RedshiftDestinationUpdate(
2421
- input.RedshiftDestinationUpdate,
2422
- context
2423
- ),
2424
- }),
2425
- ...(input.S3DestinationUpdate !== undefined &&
2426
- input.S3DestinationUpdate !== null && {
2427
- S3DestinationUpdate: serializeAws_json1_1S3DestinationUpdate(input.S3DestinationUpdate, context),
2428
- }),
2429
- ...(input.SplunkDestinationUpdate !== undefined &&
2430
- input.SplunkDestinationUpdate !== null && {
2431
- SplunkDestinationUpdate: serializeAws_json1_1SplunkDestinationUpdate(input.SplunkDestinationUpdate, context),
2432
- }),
2433
- };
2434
- };
2435
-
2436
- const serializeAws_json1_1VpcConfiguration = (input: VpcConfiguration, context: __SerdeContext): any => {
2437
- return {
2438
- ...(input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN }),
2439
- ...(input.SecurityGroupIds !== undefined &&
2440
- input.SecurityGroupIds !== null && {
2441
- SecurityGroupIds: serializeAws_json1_1SecurityGroupIdList(input.SecurityGroupIds, context),
2442
- }),
2443
- ...(input.SubnetIds !== undefined &&
2444
- input.SubnetIds !== null && { SubnetIds: serializeAws_json1_1SubnetIdList(input.SubnetIds, context) }),
2445
- };
2446
- };
2447
-
2448
- const deserializeAws_json1_1BufferingHints = (output: any, context: __SerdeContext): BufferingHints => {
2449
- return {
2450
- IntervalInSeconds: __expectInt32(output.IntervalInSeconds),
2451
- SizeInMBs: __expectInt32(output.SizeInMBs),
2452
- } as any;
2453
- };
2454
-
2455
- const deserializeAws_json1_1CloudWatchLoggingOptions = (
2456
- output: any,
2457
- context: __SerdeContext
2458
- ): CloudWatchLoggingOptions => {
2459
- return {
2460
- Enabled: __expectBoolean(output.Enabled),
2461
- LogGroupName: __expectString(output.LogGroupName),
2462
- LogStreamName: __expectString(output.LogStreamName),
2463
- } as any;
2464
- };
2465
-
2466
- const deserializeAws_json1_1ColumnToJsonKeyMappings = (
2467
- output: any,
2468
- context: __SerdeContext
2469
- ): { [key: string]: string } => {
2470
- return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
2471
- if (value === null) {
2472
- return acc;
2473
- }
2474
- return {
2475
- ...acc,
2476
- [key]: __expectString(value) as any,
2477
- };
2478
- }, {});
2479
- };
2480
-
2481
- const deserializeAws_json1_1ConcurrentModificationException = (
2482
- output: any,
2483
- context: __SerdeContext
2484
- ): ConcurrentModificationException => {
2485
- return {
2486
- message: __expectString(output.message),
2487
- } as any;
2488
- };
2489
-
2490
- const deserializeAws_json1_1CopyCommand = (output: any, context: __SerdeContext): CopyCommand => {
2491
- return {
2492
- CopyOptions: __expectString(output.CopyOptions),
2493
- DataTableColumns: __expectString(output.DataTableColumns),
2494
- DataTableName: __expectString(output.DataTableName),
2495
- } as any;
2496
- };
2497
-
2498
- const deserializeAws_json1_1CreateDeliveryStreamOutput = (
2499
- output: any,
2500
- context: __SerdeContext
2501
- ): CreateDeliveryStreamOutput => {
2502
- return {
2503
- DeliveryStreamARN: __expectString(output.DeliveryStreamARN),
2504
- } as any;
2505
- };
2506
-
2507
- const deserializeAws_json1_1DataFormatConversionConfiguration = (
2508
- output: any,
2509
- context: __SerdeContext
2510
- ): DataFormatConversionConfiguration => {
2511
- return {
2512
- Enabled: __expectBoolean(output.Enabled),
2513
- InputFormatConfiguration:
2514
- output.InputFormatConfiguration !== undefined && output.InputFormatConfiguration !== null
2515
- ? deserializeAws_json1_1InputFormatConfiguration(output.InputFormatConfiguration, context)
2516
- : undefined,
2517
- OutputFormatConfiguration:
2518
- output.OutputFormatConfiguration !== undefined && output.OutputFormatConfiguration !== null
2519
- ? deserializeAws_json1_1OutputFormatConfiguration(output.OutputFormatConfiguration, context)
2520
- : undefined,
2521
- SchemaConfiguration:
2522
- output.SchemaConfiguration !== undefined && output.SchemaConfiguration !== null
2523
- ? deserializeAws_json1_1SchemaConfiguration(output.SchemaConfiguration, context)
2524
- : undefined,
2525
- } as any;
2526
- };
2527
-
2528
- const deserializeAws_json1_1DeleteDeliveryStreamOutput = (
2529
- output: any,
2530
- context: __SerdeContext
2531
- ): DeleteDeliveryStreamOutput => {
2532
- return {} as any;
2533
- };
2534
-
2535
- const deserializeAws_json1_1DeliveryStreamDescription = (
2536
- output: any,
2537
- context: __SerdeContext
2538
- ): DeliveryStreamDescription => {
2539
- return {
2540
- CreateTimestamp:
2541
- output.CreateTimestamp !== undefined && output.CreateTimestamp !== null
2542
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp)))
2543
- : undefined,
2544
- DeliveryStreamARN: __expectString(output.DeliveryStreamARN),
2545
- DeliveryStreamEncryptionConfiguration:
2546
- output.DeliveryStreamEncryptionConfiguration !== undefined &&
2547
- output.DeliveryStreamEncryptionConfiguration !== null
2548
- ? deserializeAws_json1_1DeliveryStreamEncryptionConfiguration(
2549
- output.DeliveryStreamEncryptionConfiguration,
2550
- context
2551
- )
2552
- : undefined,
2553
- DeliveryStreamName: __expectString(output.DeliveryStreamName),
2554
- DeliveryStreamStatus: __expectString(output.DeliveryStreamStatus),
2555
- DeliveryStreamType: __expectString(output.DeliveryStreamType),
2556
- Destinations:
2557
- output.Destinations !== undefined && output.Destinations !== null
2558
- ? deserializeAws_json1_1DestinationDescriptionList(output.Destinations, context)
2559
- : undefined,
2560
- FailureDescription:
2561
- output.FailureDescription !== undefined && output.FailureDescription !== null
2562
- ? deserializeAws_json1_1FailureDescription(output.FailureDescription, context)
2563
- : undefined,
2564
- HasMoreDestinations: __expectBoolean(output.HasMoreDestinations),
2565
- LastUpdateTimestamp:
2566
- output.LastUpdateTimestamp !== undefined && output.LastUpdateTimestamp !== null
2567
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp)))
2568
- : undefined,
2569
- Source:
2570
- output.Source !== undefined && output.Source !== null
2571
- ? deserializeAws_json1_1SourceDescription(output.Source, context)
2572
- : undefined,
2573
- VersionId: __expectString(output.VersionId),
2574
- } as any;
2575
- };
2576
-
2577
- const deserializeAws_json1_1DeliveryStreamEncryptionConfiguration = (
2578
- output: any,
2579
- context: __SerdeContext
2580
- ): DeliveryStreamEncryptionConfiguration => {
2581
- return {
2582
- FailureDescription:
2583
- output.FailureDescription !== undefined && output.FailureDescription !== null
2584
- ? deserializeAws_json1_1FailureDescription(output.FailureDescription, context)
2585
- : undefined,
2586
- KeyARN: __expectString(output.KeyARN),
2587
- KeyType: __expectString(output.KeyType),
2588
- Status: __expectString(output.Status),
2589
- } as any;
2590
- };
2591
-
2592
- const deserializeAws_json1_1DeliveryStreamNameList = (output: any, context: __SerdeContext): string[] => {
2593
- return (output || [])
2594
- .filter((e: any) => e != null)
2595
- .map((entry: any) => {
2596
- if (entry === null) {
2597
- return null as any;
2598
- }
2599
- return __expectString(entry) as any;
2600
- });
2601
- };
2602
-
2603
- const deserializeAws_json1_1DescribeDeliveryStreamOutput = (
2604
- output: any,
2605
- context: __SerdeContext
2606
- ): DescribeDeliveryStreamOutput => {
2607
- return {
2608
- DeliveryStreamDescription:
2609
- output.DeliveryStreamDescription !== undefined && output.DeliveryStreamDescription !== null
2610
- ? deserializeAws_json1_1DeliveryStreamDescription(output.DeliveryStreamDescription, context)
2611
- : undefined,
2612
- } as any;
2613
- };
2614
-
2615
- const deserializeAws_json1_1Deserializer = (output: any, context: __SerdeContext): Deserializer => {
2616
- return {
2617
- HiveJsonSerDe:
2618
- output.HiveJsonSerDe !== undefined && output.HiveJsonSerDe !== null
2619
- ? deserializeAws_json1_1HiveJsonSerDe(output.HiveJsonSerDe, context)
2620
- : undefined,
2621
- OpenXJsonSerDe:
2622
- output.OpenXJsonSerDe !== undefined && output.OpenXJsonSerDe !== null
2623
- ? deserializeAws_json1_1OpenXJsonSerDe(output.OpenXJsonSerDe, context)
2624
- : undefined,
2625
- } as any;
2626
- };
2627
-
2628
- const deserializeAws_json1_1DestinationDescription = (output: any, context: __SerdeContext): DestinationDescription => {
2629
- return {
2630
- DestinationId: __expectString(output.DestinationId),
2631
- ElasticsearchDestinationDescription:
2632
- output.ElasticsearchDestinationDescription !== undefined && output.ElasticsearchDestinationDescription !== null
2633
- ? deserializeAws_json1_1ElasticsearchDestinationDescription(output.ElasticsearchDestinationDescription, context)
2634
- : undefined,
2635
- ExtendedS3DestinationDescription:
2636
- output.ExtendedS3DestinationDescription !== undefined && output.ExtendedS3DestinationDescription !== null
2637
- ? deserializeAws_json1_1ExtendedS3DestinationDescription(output.ExtendedS3DestinationDescription, context)
2638
- : undefined,
2639
- HttpEndpointDestinationDescription:
2640
- output.HttpEndpointDestinationDescription !== undefined && output.HttpEndpointDestinationDescription !== null
2641
- ? deserializeAws_json1_1HttpEndpointDestinationDescription(output.HttpEndpointDestinationDescription, context)
2642
- : undefined,
2643
- RedshiftDestinationDescription:
2644
- output.RedshiftDestinationDescription !== undefined && output.RedshiftDestinationDescription !== null
2645
- ? deserializeAws_json1_1RedshiftDestinationDescription(output.RedshiftDestinationDescription, context)
2646
- : undefined,
2647
- S3DestinationDescription:
2648
- output.S3DestinationDescription !== undefined && output.S3DestinationDescription !== null
2649
- ? deserializeAws_json1_1S3DestinationDescription(output.S3DestinationDescription, context)
2650
- : undefined,
2651
- SplunkDestinationDescription:
2652
- output.SplunkDestinationDescription !== undefined && output.SplunkDestinationDescription !== null
2653
- ? deserializeAws_json1_1SplunkDestinationDescription(output.SplunkDestinationDescription, context)
2654
- : undefined,
2655
- } as any;
2656
- };
2657
-
2658
- const deserializeAws_json1_1DestinationDescriptionList = (
2659
- output: any,
2660
- context: __SerdeContext
2661
- ): DestinationDescription[] => {
2662
- return (output || [])
2663
- .filter((e: any) => e != null)
2664
- .map((entry: any) => {
2665
- if (entry === null) {
2666
- return null as any;
2667
- }
2668
- return deserializeAws_json1_1DestinationDescription(entry, context);
2669
- });
2670
- };
2671
-
2672
- const deserializeAws_json1_1DynamicPartitioningConfiguration = (
2673
- output: any,
2674
- context: __SerdeContext
2675
- ): DynamicPartitioningConfiguration => {
2676
- return {
2677
- Enabled: __expectBoolean(output.Enabled),
2678
- RetryOptions:
2679
- output.RetryOptions !== undefined && output.RetryOptions !== null
2680
- ? deserializeAws_json1_1RetryOptions(output.RetryOptions, context)
2681
- : undefined,
2682
- } as any;
2683
- };
2684
-
2685
- const deserializeAws_json1_1ElasticsearchBufferingHints = (
2686
- output: any,
2687
- context: __SerdeContext
2688
- ): ElasticsearchBufferingHints => {
2689
- return {
2690
- IntervalInSeconds: __expectInt32(output.IntervalInSeconds),
2691
- SizeInMBs: __expectInt32(output.SizeInMBs),
2692
- } as any;
2693
- };
2694
-
2695
- const deserializeAws_json1_1ElasticsearchDestinationDescription = (
2696
- output: any,
2697
- context: __SerdeContext
2698
- ): ElasticsearchDestinationDescription => {
2699
- return {
2700
- BufferingHints:
2701
- output.BufferingHints !== undefined && output.BufferingHints !== null
2702
- ? deserializeAws_json1_1ElasticsearchBufferingHints(output.BufferingHints, context)
2703
- : undefined,
2704
- CloudWatchLoggingOptions:
2705
- output.CloudWatchLoggingOptions !== undefined && output.CloudWatchLoggingOptions !== null
2706
- ? deserializeAws_json1_1CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context)
2707
- : undefined,
2708
- ClusterEndpoint: __expectString(output.ClusterEndpoint),
2709
- DomainARN: __expectString(output.DomainARN),
2710
- IndexName: __expectString(output.IndexName),
2711
- IndexRotationPeriod: __expectString(output.IndexRotationPeriod),
2712
- ProcessingConfiguration:
2713
- output.ProcessingConfiguration !== undefined && output.ProcessingConfiguration !== null
2714
- ? deserializeAws_json1_1ProcessingConfiguration(output.ProcessingConfiguration, context)
2715
- : undefined,
2716
- RetryOptions:
2717
- output.RetryOptions !== undefined && output.RetryOptions !== null
2718
- ? deserializeAws_json1_1ElasticsearchRetryOptions(output.RetryOptions, context)
2719
- : undefined,
2720
- RoleARN: __expectString(output.RoleARN),
2721
- S3BackupMode: __expectString(output.S3BackupMode),
2722
- S3DestinationDescription:
2723
- output.S3DestinationDescription !== undefined && output.S3DestinationDescription !== null
2724
- ? deserializeAws_json1_1S3DestinationDescription(output.S3DestinationDescription, context)
2725
- : undefined,
2726
- TypeName: __expectString(output.TypeName),
2727
- VpcConfigurationDescription:
2728
- output.VpcConfigurationDescription !== undefined && output.VpcConfigurationDescription !== null
2729
- ? deserializeAws_json1_1VpcConfigurationDescription(output.VpcConfigurationDescription, context)
2730
- : undefined,
2731
- } as any;
2732
- };
2733
-
2734
- const deserializeAws_json1_1ElasticsearchRetryOptions = (
2735
- output: any,
2736
- context: __SerdeContext
2737
- ): ElasticsearchRetryOptions => {
2738
- return {
2739
- DurationInSeconds: __expectInt32(output.DurationInSeconds),
2740
- } as any;
2741
- };
2742
-
2743
- const deserializeAws_json1_1EncryptionConfiguration = (
2744
- output: any,
2745
- context: __SerdeContext
2746
- ): EncryptionConfiguration => {
2747
- return {
2748
- KMSEncryptionConfig:
2749
- output.KMSEncryptionConfig !== undefined && output.KMSEncryptionConfig !== null
2750
- ? deserializeAws_json1_1KMSEncryptionConfig(output.KMSEncryptionConfig, context)
2751
- : undefined,
2752
- NoEncryptionConfig: __expectString(output.NoEncryptionConfig),
2753
- } as any;
2754
- };
2755
-
2756
- const deserializeAws_json1_1ExtendedS3DestinationDescription = (
2757
- output: any,
2758
- context: __SerdeContext
2759
- ): ExtendedS3DestinationDescription => {
2760
- return {
2761
- BucketARN: __expectString(output.BucketARN),
2762
- BufferingHints:
2763
- output.BufferingHints !== undefined && output.BufferingHints !== null
2764
- ? deserializeAws_json1_1BufferingHints(output.BufferingHints, context)
2765
- : undefined,
2766
- CloudWatchLoggingOptions:
2767
- output.CloudWatchLoggingOptions !== undefined && output.CloudWatchLoggingOptions !== null
2768
- ? deserializeAws_json1_1CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context)
2769
- : undefined,
2770
- CompressionFormat: __expectString(output.CompressionFormat),
2771
- DataFormatConversionConfiguration:
2772
- output.DataFormatConversionConfiguration !== undefined && output.DataFormatConversionConfiguration !== null
2773
- ? deserializeAws_json1_1DataFormatConversionConfiguration(output.DataFormatConversionConfiguration, context)
2774
- : undefined,
2775
- DynamicPartitioningConfiguration:
2776
- output.DynamicPartitioningConfiguration !== undefined && output.DynamicPartitioningConfiguration !== null
2777
- ? deserializeAws_json1_1DynamicPartitioningConfiguration(output.DynamicPartitioningConfiguration, context)
2778
- : undefined,
2779
- EncryptionConfiguration:
2780
- output.EncryptionConfiguration !== undefined && output.EncryptionConfiguration !== null
2781
- ? deserializeAws_json1_1EncryptionConfiguration(output.EncryptionConfiguration, context)
2782
- : undefined,
2783
- ErrorOutputPrefix: __expectString(output.ErrorOutputPrefix),
2784
- Prefix: __expectString(output.Prefix),
2785
- ProcessingConfiguration:
2786
- output.ProcessingConfiguration !== undefined && output.ProcessingConfiguration !== null
2787
- ? deserializeAws_json1_1ProcessingConfiguration(output.ProcessingConfiguration, context)
2788
- : undefined,
2789
- RoleARN: __expectString(output.RoleARN),
2790
- S3BackupDescription:
2791
- output.S3BackupDescription !== undefined && output.S3BackupDescription !== null
2792
- ? deserializeAws_json1_1S3DestinationDescription(output.S3BackupDescription, context)
2793
- : undefined,
2794
- S3BackupMode: __expectString(output.S3BackupMode),
2795
- } as any;
2796
- };
2797
-
2798
- const deserializeAws_json1_1FailureDescription = (output: any, context: __SerdeContext): FailureDescription => {
2799
- return {
2800
- Details: __expectString(output.Details),
2801
- Type: __expectString(output.Type),
2802
- } as any;
2803
- };
2804
-
2805
- const deserializeAws_json1_1HiveJsonSerDe = (output: any, context: __SerdeContext): HiveJsonSerDe => {
2806
- return {
2807
- TimestampFormats:
2808
- output.TimestampFormats !== undefined && output.TimestampFormats !== null
2809
- ? deserializeAws_json1_1ListOfNonEmptyStrings(output.TimestampFormats, context)
2810
- : undefined,
2811
- } as any;
2812
- };
2813
-
2814
- const deserializeAws_json1_1HttpEndpointBufferingHints = (
2815
- output: any,
2816
- context: __SerdeContext
2817
- ): HttpEndpointBufferingHints => {
2818
- return {
2819
- IntervalInSeconds: __expectInt32(output.IntervalInSeconds),
2820
- SizeInMBs: __expectInt32(output.SizeInMBs),
2821
- } as any;
2822
- };
2823
-
2824
- const deserializeAws_json1_1HttpEndpointCommonAttribute = (
2825
- output: any,
2826
- context: __SerdeContext
2827
- ): HttpEndpointCommonAttribute => {
2828
- return {
2829
- AttributeName: __expectString(output.AttributeName),
2830
- AttributeValue: __expectString(output.AttributeValue),
2831
- } as any;
2832
- };
2833
-
2834
- const deserializeAws_json1_1HttpEndpointCommonAttributesList = (
2835
- output: any,
2836
- context: __SerdeContext
2837
- ): HttpEndpointCommonAttribute[] => {
2838
- return (output || [])
2839
- .filter((e: any) => e != null)
2840
- .map((entry: any) => {
2841
- if (entry === null) {
2842
- return null as any;
2843
- }
2844
- return deserializeAws_json1_1HttpEndpointCommonAttribute(entry, context);
2845
- });
2846
- };
2847
-
2848
- const deserializeAws_json1_1HttpEndpointDescription = (
2849
- output: any,
2850
- context: __SerdeContext
2851
- ): HttpEndpointDescription => {
2852
- return {
2853
- Name: __expectString(output.Name),
2854
- Url: __expectString(output.Url),
2855
- } as any;
2856
- };
2857
-
2858
- const deserializeAws_json1_1HttpEndpointDestinationDescription = (
2859
- output: any,
2860
- context: __SerdeContext
2861
- ): HttpEndpointDestinationDescription => {
2862
- return {
2863
- BufferingHints:
2864
- output.BufferingHints !== undefined && output.BufferingHints !== null
2865
- ? deserializeAws_json1_1HttpEndpointBufferingHints(output.BufferingHints, context)
2866
- : undefined,
2867
- CloudWatchLoggingOptions:
2868
- output.CloudWatchLoggingOptions !== undefined && output.CloudWatchLoggingOptions !== null
2869
- ? deserializeAws_json1_1CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context)
2870
- : undefined,
2871
- EndpointConfiguration:
2872
- output.EndpointConfiguration !== undefined && output.EndpointConfiguration !== null
2873
- ? deserializeAws_json1_1HttpEndpointDescription(output.EndpointConfiguration, context)
2874
- : undefined,
2875
- ProcessingConfiguration:
2876
- output.ProcessingConfiguration !== undefined && output.ProcessingConfiguration !== null
2877
- ? deserializeAws_json1_1ProcessingConfiguration(output.ProcessingConfiguration, context)
2878
- : undefined,
2879
- RequestConfiguration:
2880
- output.RequestConfiguration !== undefined && output.RequestConfiguration !== null
2881
- ? deserializeAws_json1_1HttpEndpointRequestConfiguration(output.RequestConfiguration, context)
2882
- : undefined,
2883
- RetryOptions:
2884
- output.RetryOptions !== undefined && output.RetryOptions !== null
2885
- ? deserializeAws_json1_1HttpEndpointRetryOptions(output.RetryOptions, context)
2886
- : undefined,
2887
- RoleARN: __expectString(output.RoleARN),
2888
- S3BackupMode: __expectString(output.S3BackupMode),
2889
- S3DestinationDescription:
2890
- output.S3DestinationDescription !== undefined && output.S3DestinationDescription !== null
2891
- ? deserializeAws_json1_1S3DestinationDescription(output.S3DestinationDescription, context)
2892
- : undefined,
2893
- } as any;
2894
- };
2895
-
2896
- const deserializeAws_json1_1HttpEndpointRequestConfiguration = (
2897
- output: any,
2898
- context: __SerdeContext
2899
- ): HttpEndpointRequestConfiguration => {
2900
- return {
2901
- CommonAttributes:
2902
- output.CommonAttributes !== undefined && output.CommonAttributes !== null
2903
- ? deserializeAws_json1_1HttpEndpointCommonAttributesList(output.CommonAttributes, context)
2904
- : undefined,
2905
- ContentEncoding: __expectString(output.ContentEncoding),
2906
- } as any;
2907
- };
2908
-
2909
- const deserializeAws_json1_1HttpEndpointRetryOptions = (
2910
- output: any,
2911
- context: __SerdeContext
2912
- ): HttpEndpointRetryOptions => {
2913
- return {
2914
- DurationInSeconds: __expectInt32(output.DurationInSeconds),
2915
- } as any;
2916
- };
2917
-
2918
- const deserializeAws_json1_1InputFormatConfiguration = (
2919
- output: any,
2920
- context: __SerdeContext
2921
- ): InputFormatConfiguration => {
2922
- return {
2923
- Deserializer:
2924
- output.Deserializer !== undefined && output.Deserializer !== null
2925
- ? deserializeAws_json1_1Deserializer(output.Deserializer, context)
2926
- : undefined,
2927
- } as any;
2928
- };
2929
-
2930
- const deserializeAws_json1_1InvalidArgumentException = (
2931
- output: any,
2932
- context: __SerdeContext
2933
- ): InvalidArgumentException => {
2934
- return {
2935
- message: __expectString(output.message),
2936
- } as any;
2937
- };
2938
-
2939
- const deserializeAws_json1_1InvalidKMSResourceException = (
2940
- output: any,
2941
- context: __SerdeContext
2942
- ): InvalidKMSResourceException => {
2943
- return {
2944
- code: __expectString(output.code),
2945
- message: __expectString(output.message),
2946
- } as any;
2947
- };
2948
-
2949
- const deserializeAws_json1_1KinesisStreamSourceDescription = (
2950
- output: any,
2951
- context: __SerdeContext
2952
- ): KinesisStreamSourceDescription => {
2953
- return {
2954
- DeliveryStartTimestamp:
2955
- output.DeliveryStartTimestamp !== undefined && output.DeliveryStartTimestamp !== null
2956
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeliveryStartTimestamp)))
2957
- : undefined,
2958
- KinesisStreamARN: __expectString(output.KinesisStreamARN),
2959
- RoleARN: __expectString(output.RoleARN),
2960
- } as any;
2961
- };
2962
-
2963
- const deserializeAws_json1_1KMSEncryptionConfig = (output: any, context: __SerdeContext): KMSEncryptionConfig => {
2964
- return {
2965
- AWSKMSKeyARN: __expectString(output.AWSKMSKeyARN),
2966
- } as any;
2967
- };
2968
-
2969
- const deserializeAws_json1_1LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => {
2970
- return {
2971
- message: __expectString(output.message),
2972
- } as any;
2973
- };
2974
-
2975
- const deserializeAws_json1_1ListDeliveryStreamsOutput = (
2976
- output: any,
2977
- context: __SerdeContext
2978
- ): ListDeliveryStreamsOutput => {
2979
- return {
2980
- DeliveryStreamNames:
2981
- output.DeliveryStreamNames !== undefined && output.DeliveryStreamNames !== null
2982
- ? deserializeAws_json1_1DeliveryStreamNameList(output.DeliveryStreamNames, context)
2983
- : undefined,
2984
- HasMoreDeliveryStreams: __expectBoolean(output.HasMoreDeliveryStreams),
2985
- } as any;
2986
- };
2987
-
2988
- const deserializeAws_json1_1ListOfNonEmptyStrings = (output: any, context: __SerdeContext): string[] => {
2989
- return (output || [])
2990
- .filter((e: any) => e != null)
2991
- .map((entry: any) => {
2992
- if (entry === null) {
2993
- return null as any;
2994
- }
2995
- return __expectString(entry) as any;
2996
- });
2997
- };
2998
-
2999
- const deserializeAws_json1_1ListOfNonEmptyStringsWithoutWhitespace = (
3000
- output: any,
3001
- context: __SerdeContext
3002
- ): string[] => {
3003
- return (output || [])
3004
- .filter((e: any) => e != null)
3005
- .map((entry: any) => {
3006
- if (entry === null) {
3007
- return null as any;
3008
- }
3009
- return __expectString(entry) as any;
3010
- });
3011
- };
3012
-
3013
- const deserializeAws_json1_1ListTagsForDeliveryStreamOutput = (
3014
- output: any,
3015
- context: __SerdeContext
3016
- ): ListTagsForDeliveryStreamOutput => {
3017
- return {
3018
- HasMoreTags: __expectBoolean(output.HasMoreTags),
3019
- Tags:
3020
- output.Tags !== undefined && output.Tags !== null
3021
- ? deserializeAws_json1_1ListTagsForDeliveryStreamOutputTagList(output.Tags, context)
3022
- : undefined,
3023
- } as any;
3024
- };
3025
-
3026
- const deserializeAws_json1_1ListTagsForDeliveryStreamOutputTagList = (output: any, context: __SerdeContext): Tag[] => {
3027
- return (output || [])
3028
- .filter((e: any) => e != null)
3029
- .map((entry: any) => {
3030
- if (entry === null) {
3031
- return null as any;
3032
- }
3033
- return deserializeAws_json1_1Tag(entry, context);
3034
- });
3035
- };
3036
-
3037
- const deserializeAws_json1_1OpenXJsonSerDe = (output: any, context: __SerdeContext): OpenXJsonSerDe => {
3038
- return {
3039
- CaseInsensitive: __expectBoolean(output.CaseInsensitive),
3040
- ColumnToJsonKeyMappings:
3041
- output.ColumnToJsonKeyMappings !== undefined && output.ColumnToJsonKeyMappings !== null
3042
- ? deserializeAws_json1_1ColumnToJsonKeyMappings(output.ColumnToJsonKeyMappings, context)
3043
- : undefined,
3044
- ConvertDotsInJsonKeysToUnderscores: __expectBoolean(output.ConvertDotsInJsonKeysToUnderscores),
3045
- } as any;
3046
- };
3047
-
3048
- const deserializeAws_json1_1OrcSerDe = (output: any, context: __SerdeContext): OrcSerDe => {
3049
- return {
3050
- BlockSizeBytes: __expectInt32(output.BlockSizeBytes),
3051
- BloomFilterColumns:
3052
- output.BloomFilterColumns !== undefined && output.BloomFilterColumns !== null
3053
- ? deserializeAws_json1_1ListOfNonEmptyStringsWithoutWhitespace(output.BloomFilterColumns, context)
3054
- : undefined,
3055
- BloomFilterFalsePositiveProbability: __limitedParseDouble(output.BloomFilterFalsePositiveProbability),
3056
- Compression: __expectString(output.Compression),
3057
- DictionaryKeyThreshold: __limitedParseDouble(output.DictionaryKeyThreshold),
3058
- EnablePadding: __expectBoolean(output.EnablePadding),
3059
- FormatVersion: __expectString(output.FormatVersion),
3060
- PaddingTolerance: __limitedParseDouble(output.PaddingTolerance),
3061
- RowIndexStride: __expectInt32(output.RowIndexStride),
3062
- StripeSizeBytes: __expectInt32(output.StripeSizeBytes),
3063
- } as any;
3064
- };
3065
-
3066
- const deserializeAws_json1_1OutputFormatConfiguration = (
3067
- output: any,
3068
- context: __SerdeContext
3069
- ): OutputFormatConfiguration => {
3070
- return {
3071
- Serializer:
3072
- output.Serializer !== undefined && output.Serializer !== null
3073
- ? deserializeAws_json1_1Serializer(output.Serializer, context)
3074
- : undefined,
3075
- } as any;
3076
- };
3077
-
3078
- const deserializeAws_json1_1ParquetSerDe = (output: any, context: __SerdeContext): ParquetSerDe => {
3079
- return {
3080
- BlockSizeBytes: __expectInt32(output.BlockSizeBytes),
3081
- Compression: __expectString(output.Compression),
3082
- EnableDictionaryCompression: __expectBoolean(output.EnableDictionaryCompression),
3083
- MaxPaddingBytes: __expectInt32(output.MaxPaddingBytes),
3084
- PageSizeBytes: __expectInt32(output.PageSizeBytes),
3085
- WriterVersion: __expectString(output.WriterVersion),
3086
- } as any;
3087
- };
3088
-
3089
- const deserializeAws_json1_1ProcessingConfiguration = (
3090
- output: any,
3091
- context: __SerdeContext
3092
- ): ProcessingConfiguration => {
3093
- return {
3094
- Enabled: __expectBoolean(output.Enabled),
3095
- Processors:
3096
- output.Processors !== undefined && output.Processors !== null
3097
- ? deserializeAws_json1_1ProcessorList(output.Processors, context)
3098
- : undefined,
3099
- } as any;
3100
- };
3101
-
3102
- const deserializeAws_json1_1Processor = (output: any, context: __SerdeContext): Processor => {
3103
- return {
3104
- Parameters:
3105
- output.Parameters !== undefined && output.Parameters !== null
3106
- ? deserializeAws_json1_1ProcessorParameterList(output.Parameters, context)
3107
- : undefined,
3108
- Type: __expectString(output.Type),
3109
- } as any;
3110
- };
3111
-
3112
- const deserializeAws_json1_1ProcessorList = (output: any, context: __SerdeContext): Processor[] => {
3113
- return (output || [])
3114
- .filter((e: any) => e != null)
3115
- .map((entry: any) => {
3116
- if (entry === null) {
3117
- return null as any;
3118
- }
3119
- return deserializeAws_json1_1Processor(entry, context);
3120
- });
3121
- };
3122
-
3123
- const deserializeAws_json1_1ProcessorParameter = (output: any, context: __SerdeContext): ProcessorParameter => {
3124
- return {
3125
- ParameterName: __expectString(output.ParameterName),
3126
- ParameterValue: __expectString(output.ParameterValue),
3127
- } as any;
3128
- };
3129
-
3130
- const deserializeAws_json1_1ProcessorParameterList = (output: any, context: __SerdeContext): ProcessorParameter[] => {
3131
- return (output || [])
3132
- .filter((e: any) => e != null)
3133
- .map((entry: any) => {
3134
- if (entry === null) {
3135
- return null as any;
3136
- }
3137
- return deserializeAws_json1_1ProcessorParameter(entry, context);
3138
- });
3139
- };
3140
-
3141
- const deserializeAws_json1_1PutRecordBatchOutput = (output: any, context: __SerdeContext): PutRecordBatchOutput => {
3142
- return {
3143
- Encrypted: __expectBoolean(output.Encrypted),
3144
- FailedPutCount: __expectInt32(output.FailedPutCount),
3145
- RequestResponses:
3146
- output.RequestResponses !== undefined && output.RequestResponses !== null
3147
- ? deserializeAws_json1_1PutRecordBatchResponseEntryList(output.RequestResponses, context)
3148
- : undefined,
3149
- } as any;
3150
- };
3151
-
3152
- const deserializeAws_json1_1PutRecordBatchResponseEntry = (
3153
- output: any,
3154
- context: __SerdeContext
3155
- ): PutRecordBatchResponseEntry => {
3156
- return {
3157
- ErrorCode: __expectString(output.ErrorCode),
3158
- ErrorMessage: __expectString(output.ErrorMessage),
3159
- RecordId: __expectString(output.RecordId),
3160
- } as any;
3161
- };
3162
-
3163
- const deserializeAws_json1_1PutRecordBatchResponseEntryList = (
3164
- output: any,
3165
- context: __SerdeContext
3166
- ): PutRecordBatchResponseEntry[] => {
3167
- return (output || [])
3168
- .filter((e: any) => e != null)
3169
- .map((entry: any) => {
3170
- if (entry === null) {
3171
- return null as any;
3172
- }
3173
- return deserializeAws_json1_1PutRecordBatchResponseEntry(entry, context);
3174
- });
3175
- };
3176
-
3177
- const deserializeAws_json1_1PutRecordOutput = (output: any, context: __SerdeContext): PutRecordOutput => {
3178
- return {
3179
- Encrypted: __expectBoolean(output.Encrypted),
3180
- RecordId: __expectString(output.RecordId),
3181
- } as any;
3182
- };
3183
-
3184
- const deserializeAws_json1_1RedshiftDestinationDescription = (
3185
- output: any,
3186
- context: __SerdeContext
3187
- ): RedshiftDestinationDescription => {
3188
- return {
3189
- CloudWatchLoggingOptions:
3190
- output.CloudWatchLoggingOptions !== undefined && output.CloudWatchLoggingOptions !== null
3191
- ? deserializeAws_json1_1CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context)
3192
- : undefined,
3193
- ClusterJDBCURL: __expectString(output.ClusterJDBCURL),
3194
- CopyCommand:
3195
- output.CopyCommand !== undefined && output.CopyCommand !== null
3196
- ? deserializeAws_json1_1CopyCommand(output.CopyCommand, context)
3197
- : undefined,
3198
- ProcessingConfiguration:
3199
- output.ProcessingConfiguration !== undefined && output.ProcessingConfiguration !== null
3200
- ? deserializeAws_json1_1ProcessingConfiguration(output.ProcessingConfiguration, context)
3201
- : undefined,
3202
- RetryOptions:
3203
- output.RetryOptions !== undefined && output.RetryOptions !== null
3204
- ? deserializeAws_json1_1RedshiftRetryOptions(output.RetryOptions, context)
3205
- : undefined,
3206
- RoleARN: __expectString(output.RoleARN),
3207
- S3BackupDescription:
3208
- output.S3BackupDescription !== undefined && output.S3BackupDescription !== null
3209
- ? deserializeAws_json1_1S3DestinationDescription(output.S3BackupDescription, context)
3210
- : undefined,
3211
- S3BackupMode: __expectString(output.S3BackupMode),
3212
- S3DestinationDescription:
3213
- output.S3DestinationDescription !== undefined && output.S3DestinationDescription !== null
3214
- ? deserializeAws_json1_1S3DestinationDescription(output.S3DestinationDescription, context)
3215
- : undefined,
3216
- Username: __expectString(output.Username),
3217
- } as any;
3218
- };
3219
-
3220
- const deserializeAws_json1_1RedshiftRetryOptions = (output: any, context: __SerdeContext): RedshiftRetryOptions => {
3221
- return {
3222
- DurationInSeconds: __expectInt32(output.DurationInSeconds),
3223
- } as any;
3224
- };
3225
-
3226
- const deserializeAws_json1_1ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => {
3227
- return {
3228
- message: __expectString(output.message),
3229
- } as any;
3230
- };
3231
-
3232
- const deserializeAws_json1_1ResourceNotFoundException = (
3233
- output: any,
3234
- context: __SerdeContext
3235
- ): ResourceNotFoundException => {
3236
- return {
3237
- message: __expectString(output.message),
3238
- } as any;
3239
- };
3240
-
3241
- const deserializeAws_json1_1RetryOptions = (output: any, context: __SerdeContext): RetryOptions => {
3242
- return {
3243
- DurationInSeconds: __expectInt32(output.DurationInSeconds),
3244
- } as any;
3245
- };
3246
-
3247
- const deserializeAws_json1_1S3DestinationDescription = (
3248
- output: any,
3249
- context: __SerdeContext
3250
- ): S3DestinationDescription => {
3251
- return {
3252
- BucketARN: __expectString(output.BucketARN),
3253
- BufferingHints:
3254
- output.BufferingHints !== undefined && output.BufferingHints !== null
3255
- ? deserializeAws_json1_1BufferingHints(output.BufferingHints, context)
3256
- : undefined,
3257
- CloudWatchLoggingOptions:
3258
- output.CloudWatchLoggingOptions !== undefined && output.CloudWatchLoggingOptions !== null
3259
- ? deserializeAws_json1_1CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context)
3260
- : undefined,
3261
- CompressionFormat: __expectString(output.CompressionFormat),
3262
- EncryptionConfiguration:
3263
- output.EncryptionConfiguration !== undefined && output.EncryptionConfiguration !== null
3264
- ? deserializeAws_json1_1EncryptionConfiguration(output.EncryptionConfiguration, context)
3265
- : undefined,
3266
- ErrorOutputPrefix: __expectString(output.ErrorOutputPrefix),
3267
- Prefix: __expectString(output.Prefix),
3268
- RoleARN: __expectString(output.RoleARN),
3269
- } as any;
3270
- };
3271
-
3272
- const deserializeAws_json1_1SchemaConfiguration = (output: any, context: __SerdeContext): SchemaConfiguration => {
3273
- return {
3274
- CatalogId: __expectString(output.CatalogId),
3275
- DatabaseName: __expectString(output.DatabaseName),
3276
- Region: __expectString(output.Region),
3277
- RoleARN: __expectString(output.RoleARN),
3278
- TableName: __expectString(output.TableName),
3279
- VersionId: __expectString(output.VersionId),
3280
- } as any;
3281
- };
3282
-
3283
- const deserializeAws_json1_1SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => {
3284
- return (output || [])
3285
- .filter((e: any) => e != null)
3286
- .map((entry: any) => {
3287
- if (entry === null) {
3288
- return null as any;
3289
- }
3290
- return __expectString(entry) as any;
3291
- });
3292
- };
3293
-
3294
- const deserializeAws_json1_1Serializer = (output: any, context: __SerdeContext): Serializer => {
3295
- return {
3296
- OrcSerDe:
3297
- output.OrcSerDe !== undefined && output.OrcSerDe !== null
3298
- ? deserializeAws_json1_1OrcSerDe(output.OrcSerDe, context)
3299
- : undefined,
3300
- ParquetSerDe:
3301
- output.ParquetSerDe !== undefined && output.ParquetSerDe !== null
3302
- ? deserializeAws_json1_1ParquetSerDe(output.ParquetSerDe, context)
3303
- : undefined,
3304
- } as any;
3305
- };
3306
-
3307
- const deserializeAws_json1_1ServiceUnavailableException = (
3308
- output: any,
3309
- context: __SerdeContext
3310
- ): ServiceUnavailableException => {
3311
- return {
3312
- message: __expectString(output.message),
3313
- } as any;
3314
- };
3315
-
3316
- const deserializeAws_json1_1SourceDescription = (output: any, context: __SerdeContext): SourceDescription => {
3317
- return {
3318
- KinesisStreamSourceDescription:
3319
- output.KinesisStreamSourceDescription !== undefined && output.KinesisStreamSourceDescription !== null
3320
- ? deserializeAws_json1_1KinesisStreamSourceDescription(output.KinesisStreamSourceDescription, context)
3321
- : undefined,
3322
- } as any;
3323
- };
3324
-
3325
- const deserializeAws_json1_1SplunkDestinationDescription = (
3326
- output: any,
3327
- context: __SerdeContext
3328
- ): SplunkDestinationDescription => {
3329
- return {
3330
- CloudWatchLoggingOptions:
3331
- output.CloudWatchLoggingOptions !== undefined && output.CloudWatchLoggingOptions !== null
3332
- ? deserializeAws_json1_1CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context)
3333
- : undefined,
3334
- HECAcknowledgmentTimeoutInSeconds: __expectInt32(output.HECAcknowledgmentTimeoutInSeconds),
3335
- HECEndpoint: __expectString(output.HECEndpoint),
3336
- HECEndpointType: __expectString(output.HECEndpointType),
3337
- HECToken: __expectString(output.HECToken),
3338
- ProcessingConfiguration:
3339
- output.ProcessingConfiguration !== undefined && output.ProcessingConfiguration !== null
3340
- ? deserializeAws_json1_1ProcessingConfiguration(output.ProcessingConfiguration, context)
3341
- : undefined,
3342
- RetryOptions:
3343
- output.RetryOptions !== undefined && output.RetryOptions !== null
3344
- ? deserializeAws_json1_1SplunkRetryOptions(output.RetryOptions, context)
3345
- : undefined,
3346
- S3BackupMode: __expectString(output.S3BackupMode),
3347
- S3DestinationDescription:
3348
- output.S3DestinationDescription !== undefined && output.S3DestinationDescription !== null
3349
- ? deserializeAws_json1_1S3DestinationDescription(output.S3DestinationDescription, context)
3350
- : undefined,
3351
- } as any;
3352
- };
3353
-
3354
- const deserializeAws_json1_1SplunkRetryOptions = (output: any, context: __SerdeContext): SplunkRetryOptions => {
3355
- return {
3356
- DurationInSeconds: __expectInt32(output.DurationInSeconds),
3357
- } as any;
3358
- };
3359
-
3360
- const deserializeAws_json1_1StartDeliveryStreamEncryptionOutput = (
3361
- output: any,
3362
- context: __SerdeContext
3363
- ): StartDeliveryStreamEncryptionOutput => {
3364
- return {} as any;
3365
- };
3366
-
3367
- const deserializeAws_json1_1StopDeliveryStreamEncryptionOutput = (
3368
- output: any,
3369
- context: __SerdeContext
3370
- ): StopDeliveryStreamEncryptionOutput => {
3371
- return {} as any;
3372
- };
3373
-
3374
- const deserializeAws_json1_1SubnetIdList = (output: any, context: __SerdeContext): string[] => {
3375
- return (output || [])
3376
- .filter((e: any) => e != null)
3377
- .map((entry: any) => {
3378
- if (entry === null) {
3379
- return null as any;
3380
- }
3381
- return __expectString(entry) as any;
3382
- });
3383
- };
3384
-
3385
- const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
3386
- return {
3387
- Key: __expectString(output.Key),
3388
- Value: __expectString(output.Value),
3389
- } as any;
3390
- };
3391
-
3392
- const deserializeAws_json1_1TagDeliveryStreamOutput = (
3393
- output: any,
3394
- context: __SerdeContext
3395
- ): TagDeliveryStreamOutput => {
3396
- return {} as any;
3397
- };
3398
-
3399
- const deserializeAws_json1_1UntagDeliveryStreamOutput = (
3400
- output: any,
3401
- context: __SerdeContext
3402
- ): UntagDeliveryStreamOutput => {
3403
- return {} as any;
3404
- };
3405
-
3406
- const deserializeAws_json1_1UpdateDestinationOutput = (
3407
- output: any,
3408
- context: __SerdeContext
3409
- ): UpdateDestinationOutput => {
3410
- return {} as any;
3411
- };
3412
-
3413
- const deserializeAws_json1_1VpcConfigurationDescription = (
3414
- output: any,
3415
- context: __SerdeContext
3416
- ): VpcConfigurationDescription => {
3417
- return {
3418
- RoleARN: __expectString(output.RoleARN),
3419
- SecurityGroupIds:
3420
- output.SecurityGroupIds !== undefined && output.SecurityGroupIds !== null
3421
- ? deserializeAws_json1_1SecurityGroupIdList(output.SecurityGroupIds, context)
3422
- : undefined,
3423
- SubnetIds:
3424
- output.SubnetIds !== undefined && output.SubnetIds !== null
3425
- ? deserializeAws_json1_1SubnetIdList(output.SubnetIds, context)
3426
- : undefined,
3427
- VpcId: __expectString(output.VpcId),
3428
- } as any;
3429
- };
3430
-
3431
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
3432
- httpStatusCode: output.statusCode,
3433
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
3434
- extendedRequestId: output.headers["x-amz-id-2"],
3435
- cfId: output.headers["x-amz-cf-id"],
3436
- });
3437
-
3438
- // Collect low-level response body stream to Uint8Array.
3439
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
3440
- if (streamBody instanceof Uint8Array) {
3441
- return Promise.resolve(streamBody);
3442
- }
3443
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3444
- };
3445
-
3446
- // Encode Uint8Array data into string with utf-8.
3447
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
3448
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3449
-
3450
- const buildHttpRpcRequest = async (
3451
- context: __SerdeContext,
3452
- headers: __HeaderBag,
3453
- path: string,
3454
- resolvedHostname: string | undefined,
3455
- body: any
3456
- ): Promise<__HttpRequest> => {
3457
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3458
- const contents: any = {
3459
- protocol,
3460
- hostname,
3461
- port,
3462
- method: "POST",
3463
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3464
- headers,
3465
- };
3466
- if (resolvedHostname !== undefined) {
3467
- contents.hostname = resolvedHostname;
3468
- }
3469
- if (body !== undefined) {
3470
- contents.body = body;
3471
- }
3472
- return new __HttpRequest(contents);
3473
- };
3474
-
3475
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
3476
- collectBodyString(streamBody, context).then((encoded) => {
3477
- if (encoded.length) {
3478
- return JSON.parse(encoded);
3479
- }
3480
- return {};
3481
- });
3482
-
3483
- /**
3484
- * Load an error code for the aws.rest-json-1.1 protocol.
3485
- */
3486
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
3487
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3488
-
3489
- const sanitizeErrorCode = (rawValue: string): string => {
3490
- let cleanValue = rawValue;
3491
- if (cleanValue.indexOf(":") >= 0) {
3492
- cleanValue = cleanValue.split(":")[0];
3493
- }
3494
- if (cleanValue.indexOf("#") >= 0) {
3495
- cleanValue = cleanValue.split("#")[1];
3496
- }
3497
- return cleanValue;
3498
- };
3499
-
3500
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3501
- if (headerKey !== undefined) {
3502
- return sanitizeErrorCode(output.headers[headerKey]);
3503
- }
3504
-
3505
- if (data.code !== undefined) {
3506
- return sanitizeErrorCode(data.code);
3507
- }
3508
-
3509
- if (data["__type"] !== undefined) {
3510
- return sanitizeErrorCode(data["__type"]);
3511
- }
3512
-
3513
- return "";
3514
- };