@@ -89,7 +89,7 @@ private void generateOperationSerializer(GenerationContext context, OperationSha
89
89
90
90
// Ensure that the request type is imported.
91
91
writer .addUseImports (requestType );
92
- writer .addImport ("SerializerUtils " , "SerializerUtils " , "@aws-sdk/types" );
92
+ writer .addImport ("SerdeContext " , "SerdeContext " , "@aws-sdk/types" );
93
93
writer .addImport ("Endpoint" , "__Endpoint" , "@aws-sdk/types" );
94
94
// e.g., serializeAws_restJson1_1ExecuteStatement
95
95
String serializerMethodName = "serialize" + ProtocolGenerator .getSanitizedName (getName ()) + symbol .getName ();
@@ -99,15 +99,15 @@ private void generateOperationSerializer(GenerationContext context, OperationSha
99
99
100
100
writer .openBlock ("export function $L(\n "
101
101
+ " input: $L,\n "
102
- + " utils: SerializerUtils \n "
102
+ + " context: SerdeContext \n "
103
103
+ "): $T {" , "}" , serializerMethodName , inputType , requestType , () -> {
104
104
List <HttpBinding > labelBindings = writeRequestLabels (context , operation , bindingIndex , trait );
105
105
List <HttpBinding > queryBindings = writeRequestQueryString (context , operation , bindingIndex );
106
106
writeHeaders (context , operation , bindingIndex );
107
107
List <HttpBinding > documentBindings = writeRequestBody (context , operation , bindingIndex );
108
108
109
109
writer .openBlock ("return new $T({" , "});" , requestType , () -> {
110
- writer .write ("...utils .endpoint," );
110
+ writer .write ("...context .endpoint," );
111
111
writer .write ("protocol: \" https\" ," );
112
112
writer .write ("method: $S," , trait .getMethod ());
113
113
if (labelBindings .isEmpty ()) {
@@ -310,7 +310,7 @@ private void generateOperationDeserializer(GenerationContext context, OperationS
310
310
311
311
// Ensure that the response type is imported.
312
312
writer .addUseImports (responseType );
313
- writer .addImport ("DeserializerUtils " , "DeserializerUtils " , "@aws-sdk/types" );
313
+ writer .addImport ("SerdeContext " , "SerdeContext " , "@aws-sdk/types" );
314
314
// e.g., deserializeAws_restJson1_1ExecuteStatement
315
315
String methodName = "deserialize" + ProtocolGenerator .getSanitizedName (getName ()) + symbol .getName ();
316
316
@@ -320,7 +320,7 @@ private void generateOperationDeserializer(GenerationContext context, OperationS
320
320
321
321
writer .openBlock ("export function $L(\n "
322
322
+ " output: $T,\n "
323
- + " utils: DeserializerUtils \n "
323
+ + " context: SerdeContext \n "
324
324
+ "): Promise<$L> {" , "}" , methodName , responseType , outputType , () -> {
325
325
// TODO: Check status code to create appropriate error type or response type.
326
326
writeHeaders (context , operation , bindingIndex );
0 commit comments