@@ -9,17 +9,13 @@ import {
9
9
ForbiddenException ,
10
10
InternalServerErrorException ,
11
11
ServiceUnavailableError
12
- } from "../models/rdsdataservice " ;
12
+ } from "../models" ;
13
13
import { HttpRequest , HttpResponse } from "@aws-sdk/protocol-http" ;
14
- import {
15
- SerializerContext ,
16
- DeserializerContext ,
17
- ResponseMetadata
18
- } from "@aws-sdk/types" ;
14
+ import { SerdeContext , ResponseMetadata } from "@aws-sdk/types" ;
19
15
20
16
export function executeStatementAwsRestJson1_1Serialize (
21
17
input : ExecuteStatementRequest ,
22
- context : SerializerContext
18
+ context : SerdeContext
23
19
) : HttpRequest {
24
20
let body : any = { } ;
25
21
if ( input . resourceArn !== undefined ) {
@@ -75,7 +71,7 @@ export function executeStatementAwsRestJson1_1Serialize(
75
71
76
72
export async function executeStatementAwsRestJson1_1Deserialize (
77
73
output : HttpResponse ,
78
- context : DeserializerContext
74
+ context : SerdeContext
79
75
) : Promise < ExecuteStatementResponse > {
80
76
if ( output . statusCode !== 200 ) {
81
77
return executeStatementAwsRestJson1_1DeserializeError ( output , context ) ;
@@ -99,7 +95,7 @@ export async function executeStatementAwsRestJson1_1Deserialize(
99
95
100
96
async function executeStatementAwsRestJson1_1DeserializeError (
101
97
output : HttpResponse ,
102
- context : DeserializerContext
98
+ context : SerdeContext
103
99
) : Promise < ExecuteStatementResponse > {
104
100
let data = await parseBody ( output . body , context ) ;
105
101
let response : any ;
@@ -137,7 +133,7 @@ async function executeStatementAwsRestJson1_1DeserializeError(
137
133
138
134
const sqlParameterListAwsRestJson1_1Serialize = (
139
135
input : Array < SqlParameter > ,
140
- context : SerializerContext
136
+ context : SerdeContext
141
137
) : Array < SqlParameter > =>
142
138
input &&
143
139
input . map ( sqlParameter =>
@@ -146,7 +142,7 @@ const sqlParameterListAwsRestJson1_1Serialize = (
146
142
147
143
const sqlParameterAwsRestJson1_1Serialize = (
148
144
input : SqlParameter ,
149
- context : SerializerContext
145
+ context : SerdeContext
150
146
) : any =>
151
147
input . name &&
152
148
input . value && {
@@ -156,7 +152,7 @@ const sqlParameterAwsRestJson1_1Serialize = (
156
152
157
153
const fieldAwsRestJson1_1Serialize = (
158
154
input : Field ,
159
- context : SerializerContext
155
+ context : SerdeContext
160
156
) : any =>
161
157
Field . visit ( input , {
162
158
blobValue : value => {
@@ -190,7 +186,7 @@ const fieldAwsRestJson1_1Serialize = (
190
186
191
187
export function columnMetadataAwsRestJson1_1Deserialize (
192
188
input : any ,
193
- context : DeserializerContext
189
+ context : SerdeContext
194
190
) : ColumnMetadata {
195
191
let columnMetadata : any = {
196
192
$namespace : "com.amazon.rdsdataservice" ,
@@ -257,7 +253,7 @@ export function columnMetadataAwsRestJson1_1Deserialize(
257
253
258
254
const columnMetadataListAwsRestJson1_1Deserialize = (
259
255
input : any ,
260
- context : DeserializerContext
256
+ context : SerdeContext
261
257
) : Array < ColumnMetadata > =>
262
258
input &&
263
259
input . map ( ( columnMetadata : any ) =>
@@ -266,7 +262,7 @@ const columnMetadataListAwsRestJson1_1Deserialize = (
266
262
267
263
const fieldAwsRestJson1_1Deserialize = (
268
264
input : any ,
269
- context : DeserializerContext
265
+ context : SerdeContext
270
266
) : any =>
271
267
Field . visit ( input , {
272
268
blobValue : value => {
@@ -300,14 +296,14 @@ const fieldAwsRestJson1_1Deserialize = (
300
296
301
297
const generatedFieldsAwsRestJson1_1Deserialize = (
302
298
input : any ,
303
- context : DeserializerContext
299
+ context : SerdeContext
304
300
) : Array < Field > =>
305
301
input &&
306
302
input . map ( ( field : any ) => fieldAwsRestJson1_1Deserialize ( field , context ) ) ;
307
303
308
304
const recordsAwsRestJson1_1Deserialize = (
309
305
input : any ,
310
- context : DeserializerContext
306
+ context : SerdeContext
311
307
) : Array < Array < Field > > =>
312
308
input &&
313
309
input . map ( ( recordsList : any ) =>
@@ -316,14 +312,14 @@ const recordsAwsRestJson1_1Deserialize = (
316
312
317
313
const recordsListAwsRestJson1_1Deserialize = (
318
314
input : any ,
319
- context : DeserializerContext
315
+ context : SerdeContext
320
316
) : Array < Field > =>
321
317
input &&
322
318
input . map ( ( field : any ) => fieldAwsRestJson1_1Deserialize ( field , context ) ) ;
323
319
324
320
const badRequestExceptionDeserialize = (
325
321
input : any ,
326
- context : DeserializerContext
322
+ context : SerdeContext
327
323
) : BadRequestException => ( {
328
324
__type : "com.amazon.rdsdataservice#BadRequestException" ,
329
325
$name : "BadRequestException" ,
@@ -333,7 +329,7 @@ const badRequestExceptionDeserialize = (
333
329
334
330
const statementTimeoutExceptionDeserialize = (
335
331
input : any ,
336
- context : DeserializerContext
332
+ context : SerdeContext
337
333
) : StatementTimeoutException => ( {
338
334
__type : "com.amazon.rdsdataservice#StatementTimeoutException" ,
339
335
$name : "StatementTimeoutException" ,
@@ -344,7 +340,7 @@ const statementTimeoutExceptionDeserialize = (
344
340
345
341
const forbiddenExceptionDeserialize = (
346
342
input : any ,
347
- context : DeserializerContext
343
+ context : SerdeContext
348
344
) : ForbiddenException => ( {
349
345
__type : "com.amazon.rdsdataservice#ForbiddenException" ,
350
346
$name : "ForbiddenException" ,
@@ -354,7 +350,7 @@ const forbiddenExceptionDeserialize = (
354
350
355
351
const internalServerErrorExceptionDeserialize = (
356
352
input : any ,
357
- context : DeserializerContext
353
+ context : SerdeContext
358
354
) : InternalServerErrorException => ( {
359
355
__type : "com.amazon.rdsdataservice#InternalServerErrorException" ,
360
356
$name : "InternalServerErrorException" ,
@@ -363,7 +359,7 @@ const internalServerErrorExceptionDeserialize = (
363
359
364
360
const serviceUnavailableErrorDeserialize = (
365
361
input : any ,
366
- context : DeserializerContext
362
+ context : SerdeContext
367
363
) : ServiceUnavailableError => ( {
368
364
__type : "com.amazon.rdsdataservice#ServiceUnavailableError" ,
369
365
$name : "ServiceUnavailableError" ,
@@ -376,7 +372,7 @@ const deserializeMetadata = (output: HttpResponse): ResponseMetadata => ({
376
372
requestId : output . headers [ "x-amzn-requestid" ]
377
373
} ) ;
378
374
379
- const parseBody = ( streamBody : any , context : DeserializerContext ) : any => {
375
+ const parseBody = ( streamBody : any , context : SerdeContext ) : any => {
380
376
return context . streamCollector ( streamBody ) . then ( body => {
381
377
return JSON . parse ( context . utf8Encoder ( body ) ) ;
382
378
} ) ;
0 commit comments