Skip to content

Commit 0239a8a

Browse files
committed
Add postmarshallcustomization for getbucketencryption and re-generate s3 marshallers
1 parent 6aae9b6 commit 0239a8a

File tree

5 files changed

+38
-8
lines changed

5 files changed

+38
-8
lines changed

generator/ServiceModels/s3/s3.customizations.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,6 @@
278278
"GetBucketCors": {
279279
"name": "GetCORSConfiguration"
280280
},
281-
"GetBucketEncryption":{
282-
"customizeMarshaller" : true
283-
},
284281
"HeadObject": {
285282
"name": "GetObjectMetadata"
286283
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
using Amazon.Runtime.Internal;
17+
using Amazon.Runtime.Internal.Transform;
18+
using Amazon.S3.Util;
19+
20+
namespace Amazon.S3.Model.Internal.MarshallTransformations
21+
{
22+
public partial class GetBucketEncryptionRequestMarshaller : IMarshaller<IRequest, GetBucketEncryptionRequest>, IMarshaller<IRequest, Amazon.Runtime.AmazonWebServiceRequest>
23+
{
24+
partial void PostMarshallCustomization(DefaultRequest defaultRequest, GetBucketEncryptionRequest publicRequest)
25+
{
26+
defaultRequest.Suppress404Exceptions = true;
27+
}
28+
}
29+
}

sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketAccelerateConfigurationRequestMarshaller.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations
3636
/// <summary>
3737
/// GetBucketAccelerateConfiguration Request Marshaller
3838
/// </summary>
39-
public class GetBucketAccelerateConfigurationRequestMarshaller : IMarshaller<IRequest, GetBucketAccelerateConfigurationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
39+
public partial class GetBucketAccelerateConfigurationRequestMarshaller : IMarshaller<IRequest, GetBucketAccelerateConfigurationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
4040
{
4141
/// <summary>
4242
/// Marshaller the request object to the HTTP request.
@@ -72,6 +72,7 @@ public IRequest Marshall(GetBucketAccelerateConfigurationRequest publicRequest)
7272
throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketAccelerateConfigurationRequest.BucketName");
7373
request.ResourcePath = "/";
7474

75+
PostMarshallCustomization(request, publicRequest);
7576
return request;
7677
}
7778
private static GetBucketAccelerateConfigurationRequestMarshaller _instance = new GetBucketAccelerateConfigurationRequestMarshaller();
@@ -92,5 +93,6 @@ public static GetBucketAccelerateConfigurationRequestMarshaller Instance
9293
}
9394
}
9495

96+
partial void PostMarshallCustomization(DefaultRequest defaultRequest, GetBucketAccelerateConfigurationRequest publicRequest);
9597
}
9698
}

sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketEncryptionRequestMarshaller.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@
2929
using Amazon.Runtime.Internal.Transform;
3030
using Amazon.Runtime.Internal.Util;
3131
using System.Xml;
32-
using Amazon.S3.Internal;
3332

3433
#pragma warning disable CS0612,CS0618
3534
namespace Amazon.S3.Model.Internal.MarshallTransformations
3635
{
3736
/// <summary>
3837
/// GetBucketEncryption Request Marshaller
3938
/// </summary>
40-
public class GetBucketEncryptionRequestMarshaller : IMarshaller<IRequest, GetBucketEncryptionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
39+
public partial class GetBucketEncryptionRequestMarshaller : IMarshaller<IRequest, GetBucketEncryptionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
4140
{
4241
/// <summary>
4342
/// Marshaller the request object to the HTTP request.
@@ -68,7 +67,7 @@ public IRequest Marshall(GetBucketEncryptionRequest publicRequest)
6867
throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketEncryptionRequest.BucketName");
6968
request.ResourcePath = "/";
7069

71-
request = CustomMarshallTransformations.CustomizeGetBucketEncryptionMarshaller(request, publicRequest);
70+
PostMarshallCustomization(request, publicRequest);
7271
return request;
7372
}
7473
private static GetBucketEncryptionRequestMarshaller _instance = new GetBucketEncryptionRequestMarshaller();
@@ -89,5 +88,6 @@ public static GetBucketEncryptionRequestMarshaller Instance
8988
}
9089
}
9190

91+
partial void PostMarshallCustomization(DefaultRequest defaultRequest, GetBucketEncryptionRequest publicRequest);
9292
}
9393
}

sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketEncryptionRequestMarshaller.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations
3636
/// <summary>
3737
/// PutBucketEncryption Request Marshaller
3838
/// </summary>
39-
public class PutBucketEncryptionRequestMarshaller : IMarshaller<IRequest, PutBucketEncryptionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
39+
public partial class PutBucketEncryptionRequestMarshaller : IMarshaller<IRequest, PutBucketEncryptionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
4040
{
4141
/// <summary>
4242
/// Marshaller the request object to the HTTP request.
@@ -130,6 +130,7 @@ public IRequest Marshall(PutBucketEncryptionRequest publicRequest)
130130
throw new AmazonServiceException("Unable to marshall request to XML", e);
131131
}
132132

133+
PostMarshallCustomization(request, publicRequest);
133134
return request;
134135
}
135136
private static PutBucketEncryptionRequestMarshaller _instance = new PutBucketEncryptionRequestMarshaller();
@@ -150,5 +151,6 @@ public static PutBucketEncryptionRequestMarshaller Instance
150151
}
151152
}
152153

154+
partial void PostMarshallCustomization(DefaultRequest defaultRequest, PutBucketEncryptionRequest publicRequest);
153155
}
154156
}

0 commit comments

Comments
 (0)