@@ -6,9 +6,10 @@ import {
6
6
SqlParameter
7
7
} from "../models/rdsdataservice" ;
8
8
import { HttpRequest , HttpResponse } from "@aws-sdk/protocol-http" ;
9
- import { SerializerUtils , DeserializerUtils } from ' @aws-sdk/types' ;
9
+ 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
+ import { ResponseMetadata } from "@aws-sdk/types" ;
12
13
13
14
type Utils = { [ key : string ] : any } ;
14
15
@@ -73,6 +74,7 @@ export function executeStatementAwsRestJson1_1Deserialize(
73
74
}
74
75
let data : any = parseBody ( output . body , utils ) ;
75
76
return Promise . resolve ( {
77
+ $metadata : deserializeMetadata ( output ) ,
76
78
__type : "com.amazon.rdsdataservice#ExecuteStatementResponse" ,
77
79
records : recordsAwsRestJson1_1Deserialize ( data . records ) ,
78
80
columnMetadata : columnMetadataListAwsRestJson1_1Deserialize (
@@ -295,13 +297,23 @@ function recordsListAwsRestJson1_1Deserialize(input: any): Array<Field> {
295
297
return list ;
296
298
}
297
299
300
+ function deserializeMetadata ( output : HttpResponse ) : ResponseMetadata {
301
+ return {
302
+ httpStatusCode : output . statusCode ,
303
+ httpHeaders : output . headers ,
304
+ requestId : output . headers [ "x-amzn-RequestId" ]
305
+ } ;
306
+ }
307
+
298
308
function parseBody ( streamBody : any , utils ?: Utils ) : any {
299
- const streamCollector = utils && utils [ 'streamCollector' ] ?
300
- ( < DeserializerUtils > utils ) [ 'streamCollector' ] :
301
- __aws_sdk_stream_collector_node . streamCollector ;
302
- const toUtf8 = utils && utils [ 'streamCollector' ] ?
303
- ( < DeserializerUtils > utils ) [ 'utf8Encoder' ] :
304
- __aws_sdk_util_utf8_node . toUtf8 ;
309
+ const streamCollector =
310
+ utils && utils [ "streamCollector" ]
311
+ ? ( < DeserializerUtils > utils ) [ "streamCollector" ]
312
+ : __aws_sdk_stream_collector_node . streamCollector ;
313
+ const toUtf8 =
314
+ utils && utils [ "streamCollector" ]
315
+ ? ( < DeserializerUtils > utils ) [ "utf8Encoder" ]
316
+ : __aws_sdk_util_utf8_node . toUtf8 ;
305
317
streamCollector ( streamBody ) . then ( body => {
306
318
return toUtf8 ( body ) ;
307
319
} ) ;
0 commit comments