@@ -10,7 +10,6 @@ import { SerializerUtils, DeserializerUtils } from "@aws-sdk/types";
10
10
import * as __aws_sdk_stream_collector_node from "@aws-sdk/stream-collector-node" ;
11
11
import * as __aws_sdk_util_utf8_node from "@aws-sdk/util-utf8-node" ;
12
12
import { ResponseMetadata } from "@aws-sdk/types" ;
13
- import { forOfStatement } from "@babel/types" ;
14
13
15
14
type Utils = { [ key : string ] : any } ;
16
15
@@ -143,27 +142,21 @@ async function executeStatementAwsRestJson1_1DeserializeError(
143
142
} ) ;
144
143
}
145
144
146
- function sqlParameterListAwsRestJson1_1Serialize (
145
+ const sqlParameterListAwsRestJson1_1Serialize = (
147
146
input : Array < SqlParameter >
148
- ) : Array < SqlParameter > {
149
- let list : Array < SqlParameter > = [ ] ;
150
- for ( let SqlParameter of input ) {
151
- list . push ( sqlParameterAwsRestJson1_1Serialize ( SqlParameter ) ) ;
152
- }
153
- return list ;
154
- }
155
-
156
- function sqlParameterAwsRestJson1_1Serialize ( input : SqlParameter ) : any {
157
- if ( input . value !== undefined ) {
158
- return {
159
- name : input . name ,
160
- value : fieldAwsRestJson1_1Serialize ( input . value )
161
- } ;
162
- }
163
- }
147
+ ) : Array < SqlParameter > =>
148
+ input &&
149
+ input . map ( sqlParameter => sqlParameterAwsRestJson1_1Serialize ( sqlParameter ) ) ;
150
+
151
+ const sqlParameterAwsRestJson1_1Serialize = ( input : SqlParameter ) : any =>
152
+ input . name &&
153
+ input . value && {
154
+ name : input . name ,
155
+ value : fieldAwsRestJson1_1Serialize ( input . value )
156
+ } ;
164
157
165
- function fieldAwsRestJson1_1Serialize ( input : Field ) : any {
166
- return Field . visit ( input , {
158
+ const fieldAwsRestJson1_1Serialize = ( input : Field ) : any =>
159
+ Field . visit ( input , {
167
160
blobValue : value => {
168
161
value ;
169
162
} ,
@@ -192,7 +185,6 @@ function fieldAwsRestJson1_1Serialize(input: Field): any {
192
185
value ;
193
186
}
194
187
} ) ;
195
- }
196
188
197
189
export function columnMetadataAwsRestJson1_1Deserialize (
198
190
input : any
@@ -260,20 +252,16 @@ export function columnMetadataAwsRestJson1_1Deserialize(
260
252
return columnMetadata ;
261
253
}
262
254
263
- function columnMetadataListAwsRestJson1_1Deserialize (
255
+ const columnMetadataListAwsRestJson1_1Deserialize = (
264
256
input : any
265
- ) : Array < ColumnMetadata > {
266
- let list : Array < ColumnMetadata > = [ ] ;
267
- if ( input !== undefined ) {
268
- for ( let ColumnMetadata of input ) {
269
- list . push ( columnMetadataAwsRestJson1_1Deserialize ( ColumnMetadata ) ) ;
270
- }
271
- }
272
- return list ;
273
- }
274
-
275
- function fieldAwsRestJson1_1Deserialize ( input : any ) : any {
276
- return Field . visit ( input , {
257
+ ) : Array < ColumnMetadata > =>
258
+ input &&
259
+ input . map ( ( columnMetadata : any ) =>
260
+ columnMetadataAwsRestJson1_1Deserialize ( columnMetadata )
261
+ ) ;
262
+
263
+ const fieldAwsRestJson1_1Deserialize = ( input : any ) : any =>
264
+ Field . visit ( input , {
277
265
blobValue : value => {
278
266
value ;
279
267
} ,
@@ -302,45 +290,26 @@ function fieldAwsRestJson1_1Deserialize(input: any): any {
302
290
return value ;
303
291
}
304
292
} ) ;
305
- }
306
293
307
- function generatedFieldsAwsRestJson1_1Deserialize ( input : any ) : Array < Field > {
308
- let list : Array < Field > = [ ] ;
309
- if ( input !== undefined ) {
310
- for ( let Field of input ) {
311
- list . push ( fieldAwsRestJson1_1Deserialize ( Field ) ) ;
312
- }
313
- }
314
- return list ;
315
- }
294
+ const generatedFieldsAwsRestJson1_1Deserialize = ( input : any ) : Array < Field > =>
295
+ input && input . map ( ( field : any ) => fieldAwsRestJson1_1Deserialize ( field ) ) ;
316
296
317
- function recordsAwsRestJson1_1Deserialize ( input : any ) : Array < Array < Field > > {
318
- let list : Array < Array < Field > > = [ ] ;
319
- if ( input !== undefined ) {
320
- for ( let recordsList of input ) {
321
- list . push ( recordsListAwsRestJson1_1Deserialize ( recordsList ) ) ;
322
- }
323
- }
324
- return list ;
325
- }
297
+ const recordsAwsRestJson1_1Deserialize = ( input : any ) : Array < Array < Field > > =>
298
+ input &&
299
+ input . map ( ( recordsList : any ) =>
300
+ recordsListAwsRestJson1_1Deserialize ( recordsList )
301
+ ) ;
326
302
327
- function recordsListAwsRestJson1_1Deserialize ( input : any ) : Array < Field > {
328
- let list : Array < Field > = [ ] ;
329
- for ( let field of input ) {
330
- list . push ( fieldAwsRestJson1_1Deserialize ( field ) ) ;
331
- }
332
- return list ;
333
- }
303
+ const recordsListAwsRestJson1_1Deserialize = ( input : any ) : Array < Field > =>
304
+ input && input . map ( ( field : any ) => fieldAwsRestJson1_1Deserialize ( field ) ) ;
334
305
335
- function deserializeMetadata ( output : HttpResponse ) : ResponseMetadata {
336
- return {
337
- httpStatusCode : output . statusCode ,
338
- httpHeaders : output . headers ,
339
- requestId : output . headers [ "x-amzn-requestid" ]
340
- } ;
341
- }
306
+ const deserializeMetadata = ( output : HttpResponse ) : ResponseMetadata => ( {
307
+ httpStatusCode : output . statusCode ,
308
+ httpHeaders : output . headers ,
309
+ requestId : output . headers [ "x-amzn-requestid" ]
310
+ } ) ;
342
311
343
- function parseBody ( streamBody : any , utils ?: Utils ) : any {
312
+ const parseBody = ( streamBody : any , utils ?: Utils ) : any => {
344
313
const streamCollector =
345
314
utils && utils [ "streamCollector" ]
346
315
? ( < DeserializerUtils > utils ) [ "streamCollector" ]
@@ -353,4 +322,4 @@ function parseBody(streamBody: any, utils?: Utils): any {
353
322
return streamCollector ( streamBody ) . then ( body => {
354
323
return JSON . parse ( toUtf8 ( body ) ) ;
355
324
} ) ;
356
- }
325
+ } ;
0 commit comments