@@ -195,10 +195,8 @@ public void Execute()
195
195
196
196
if ( Configuration . Namespace == "Amazon.S3" )
197
197
{
198
- ExecuteProjectFileGenerators ( ) ;
199
198
// The AmazonS3RetryPolicy simply populates the static list of requests to retry for a status code of 200 which returns an exception.
200
199
ExecuteGenerator ( new AmazonS3RetryPolicy ( ) , "AmazonS3RetryPolicy.cs" ) ;
201
- return ;
202
200
}
203
201
// The top level request that all operation requests are children of
204
202
ExecuteGenerator ( new BaseRequest ( ) , "Amazon" + Configuration . ClassName + "Request.cs" , "Model" ) ;
@@ -207,10 +205,16 @@ public void Execute()
207
205
string . Format ( "ServiceEnumerations.{0}.cs" , Configuration . ClassName ) : "ServiceEnumerations.cs" ;
208
206
209
207
// Any enumerations for the service
210
- this . ExecuteGenerator ( new ServiceEnumerations ( ) , enumFileName ) ;
208
+ // skip s3 until we're at the end of s3 client generation
209
+ if ( this . Configuration . ServiceId != "S3" )
210
+ {
211
+ this . ExecuteGenerator ( new ServiceEnumerations ( ) , enumFileName ) ;
212
+ }
213
+
211
214
212
215
// Any paginators for the service
213
- if ( Configuration . ServiceModel . HasPaginators )
216
+ // skip paginators for s3 until we're at the end of s3 client generation
217
+ if ( Configuration . ServiceModel . HasPaginators && Configuration . ServiceId != "S3" )
214
218
{
215
219
foreach ( var operation in Configuration . ServiceModel . Operations )
216
220
{
@@ -227,13 +231,14 @@ public void Execute()
227
231
228
232
// Do not generate base exception if this is a child model.
229
233
// We use the base exceptions generated for the parent model.
230
- if ( ! this . Configuration . IsChildConfig )
234
+ if ( ! this . Configuration . IsChildConfig && this . Configuration . ServiceId != "S3" )
231
235
{
232
236
this . ExecuteGenerator ( new BaseServiceException ( ) , "Amazon" + this . Configuration . ClassName + "Exception.cs" ) ;
233
237
}
234
238
239
+ var operations = Configuration . Namespace == "Amazon.S3" ? Configuration . ServiceModel . S3AllowListOperations : Configuration . ServiceModel . Operations ;
235
240
// Generates the Request, Response, Marshaller, Unmarshaller, and Exception objects for a given client operation
236
- foreach ( var operation in Configuration . ServiceModel . Operations )
241
+ foreach ( var operation in operations )
237
242
{
238
243
GenerateRequest ( operation ) ;
239
244
GenerateResponse ( operation ) ;
@@ -259,16 +264,19 @@ public void Execute()
259
264
var fileName = string . Format ( "{0}EndpointDiscoveryMarshallingTests.cs" , Configuration . ClassName ) ;
260
265
ExecuteTestGenerator ( new EndpointDiscoveryMarshallingTests ( ) , fileName , "Marshalling" ) ;
261
266
}
262
-
263
- // Test that simple customizations were generated correctly
264
- GenerateCustomizationTests ( ) ;
265
267
ExecuteProjectFileGenerators ( ) ;
266
- if ( this . Configuration . ServiceModel . Customizations . HasExamples )
268
+ // Test that simple customizations were generated correctly
269
+ if ( this . Configuration . ServiceId != "S3" )
267
270
{
268
- var servicename = Configuration . Namespace . Split ( '.' ) . Last ( ) ;
269
- ExecuteExampleGenerator ( new ExampleCode ( ) , servicename + ".GeneratedSamples.cs" , servicename ) ;
270
- ExecuteExampleGenerator ( new ExampleMetadata ( ) , servicename + ".GeneratedSamples.extra.xml" ) ;
271
+ GenerateCustomizationTests ( ) ;
272
+ if ( this . Configuration . ServiceModel . Customizations . HasExamples )
273
+ {
274
+ var servicename = Configuration . Namespace . Split ( '.' ) . Last ( ) ;
275
+ ExecuteExampleGenerator ( new ExampleCode ( ) , servicename + ".GeneratedSamples.cs" , servicename ) ;
276
+ ExecuteExampleGenerator ( new ExampleMetadata ( ) , servicename + ".GeneratedSamples.extra.xml" ) ;
277
+ }
271
278
}
279
+
272
280
}
273
281
274
282
/// <summary>
@@ -280,7 +288,7 @@ void GenerateRequest(Operation operation)
280
288
var requestGenerator = new StructureGenerator
281
289
{
282
290
ClassName = operation . Name + "Request" ,
283
- BaseClass = string . Format ( "Amazon{0}Request" , Configuration . ClassName ) ,
291
+ BaseClass = this . Configuration . ServiceId != "S3" ? string . Format ( "Amazon{0}Request" , Configuration . ClassName ) : "AmazonWebServiceRequest" ,
284
292
StructureType = StructureType . Request ,
285
293
Operation = operation
286
294
} ;
@@ -671,6 +679,8 @@ void GenerateResponseUnmarshaller(Operation operation)
671
679
// instead we generated a layer over the structure. That layer is EventStreamGenerator.tt.
672
680
if ( nestedStructure . IsEventStream )
673
681
continue ;
682
+ if ( this . Configuration . ServiceId == "S3" && nestedStructure . IsEvent || nestedStructure . IsEventStream )
683
+ continue ;
674
684
// Skip already processed unmarshallers. This handles the case of structures being returned in mulitiple requests.
675
685
if ( ! this . _processedUnmarshallers . Contains ( nestedStructure . Name ) )
676
686
{
@@ -700,7 +710,13 @@ private void GenerateUnmarshaller(Shape shape)
700
710
701
711
if ( this . Configuration . ServiceModel . Customizations . IsSubstitutedShape ( nestedStructure . Name ) )
702
712
continue ;
703
-
713
+ if ( this . Configuration . ServiceId == "S3" )
714
+ {
715
+ if ( shape . IsEvent || shape . IsEventStream )
716
+ {
717
+ continue ;
718
+ }
719
+ }
704
720
// Document structure don't need a custom unmarshaller, they use
705
721
// the 'simple' DocumentMarshaller in AWSSDK.
706
722
if ( nestedStructure . IsDocument )
@@ -781,7 +797,6 @@ private void GenerateExceptions(Operation operation)
781
797
// Skip exceptions that have already been generated for the parent model
782
798
if ( IsExceptionPresentInParentModel ( this . Configuration , exceptionShape . Name ) || this . _processedStructures . Contains ( exceptionShape . Name ) )
783
799
continue ;
784
-
785
800
var generator = new StructureGenerator ( )
786
801
{
787
802
ClassName = exceptionShape . Name ,
@@ -1002,6 +1017,13 @@ void GenerateStructures(Operation operation)
1002
1017
if ( definition . IsEventStream && ! Configuration . ServiceModel . Operations . Any ( x => string . Equals ( x . ResponseEventStreamingMember ? . Shape . Name , definition . Name ) ) )
1003
1018
continue ;
1004
1019
1020
+ if ( this . Configuration . ServiceId == "S3" )
1021
+ {
1022
+ if ( definition . IsEvent || definition . IsEventStream )
1023
+ {
1024
+ continue ;
1025
+ }
1026
+ }
1005
1027
if ( ! this . _processedStructures . Contains ( definition . Name ) )
1006
1028
{
1007
1029
// if the shape had a substitution, we can skip generation
0 commit comments