Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions generator/ServiceClientGeneratorLib/ServiceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public List<Operation> S3AllowListOperations
new Operation(this, "CreateSession", DocumentRoot[OperationsKey]["CreateSession"]),
new Operation(this, "GetBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["GetBucketAnalyticsConfiguration"]),
new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]),
//new Operation(this, "GetBucketInventoryConfiguration", DocumentRoot[OperationsKey]["GetBucketInventoryConfiguration"]),
new Operation(this, "GetBucketInventoryConfiguration", DocumentRoot[OperationsKey]["GetBucketInventoryConfiguration"]),
//new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"]),
new Operation(this, "GetBucketMetricsConfiguration", DocumentRoot[OperationsKey]["GetBucketMetricsConfiguration"]),
//new Operation(this, "GetBucketVersioning", DocumentRoot[OperationsKey]["GetBucketVersioning"]),
Expand All @@ -566,7 +566,7 @@ public List<Operation> S3AllowListOperations
//new Operation(this, "SelectObjectContent", DocumentRoot[OperationsKey]["SelectObjectContent"]),
new Operation(this, "PutBucketAnalyticsConfiguration" , DocumentRoot[OperationsKey]["PutBucketAnalyticsConfiguration"]),
new Operation(this, "PutBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["PutBucketIntelligentTieringConfiguration"]),
//new Operation(this, "PutBucketInventoryConfiguration", DocumentRoot[OperationsKey]["PutBucketInventoryConfiguration"]),
new Operation(this, "PutBucketInventoryConfiguration", DocumentRoot[OperationsKey]["PutBucketInventoryConfiguration"]),
new Operation(this, "PutBucketMetricsConfiguration", DocumentRoot[OperationsKey]["PutBucketMetricsConfiguration"]),
new Operation(this, "DeleteBucketMetricsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketMetricsConfiguration"]),
new Operation(this, "DeleteBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketAnalyticsConfiguration"]),
Expand Down
65 changes: 63 additions & 2 deletions generator/ServiceModels/s3/s3.customizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,66 @@
"Id":{"emitPropertyName": "IntelligentTieringId"}
}
]
},
"PutBucketInventoryConfigurationRequest":{
"modify":[
{
"Id" :{"emitPropertyName":"InventoryId"}
},
{
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
}
]
},
"InventoryConfiguration":{
"modify":[
{
"Filter":{"emitPropertyName":"InventoryFilter"}
},
{
"Id":{"emitPropertyName":"InventoryId"}
},
{
"InventoryId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._inventoryId);"]}
},
{
"OptionalFields":{"emitPropertyName": "InventoryOptionalFields"}
},
{
"InventoryFilter":{"injectXmlMarshallCode":["InventoryFilterCustomMarshall(publicRequest, xmlWriter);"]}
}
]
},
"InventoryS3BucketDestination":{
"modify":[
{
"AccountId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._accountId);"]}
},
{
"BucketName":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._bucketName);"]}
},
{
"Encryption":{"emitPropertyName": "InventoryEncryption"}
},
{
"Prefix":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._prefix);"]}
},
{
"Format":{"emitPropertyName":"InventoryFormat"}
}
]
},
"GetBucketInventoryConfigurationRequest":{
"modify":[
{
"Id":{"emitPropertyName":"InventoryId"}
},
{
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
}
]
}

},
"operationModifiers": {
"CreateBucket": {
Expand Down Expand Up @@ -1221,7 +1280,8 @@
}
},
"overrideTreatEnumsAsString":{
"ObjectAttributesList": false
"ObjectAttributesList": false,
"InventoryOptionalFields": false
},
"dataTypeSwap":{
"ListPartsRequest":{
Expand Down Expand Up @@ -1452,6 +1512,7 @@
"AnalyticsFilter",
"AnalyticsAndOperator",
"IntelligentTieringFilter",
"IntelligentTieringAndOperator"
"IntelligentTieringAndOperator",
"InventoryFilter"
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
Expand All @@ -21,52 +21,14 @@

namespace Amazon.S3.Model.Internal.MarshallTransformations
{
/// <summary>
/// Get InventoryConfiguration Request Marshaller
///<summary>
/// Custom marshaller for GetBucketInventoryConfiguration
/// </summary>
public class GetBucketInventoryConfigurationRequestMarshaller : IMarshaller<IRequest, GetBucketInventoryConfigurationRequest>, IMarshaller<IRequest, Amazon.Runtime.AmazonWebServiceRequest>
public partial class GetBucketInventoryConfigurationRequestMarshaller : IMarshaller<IRequest, GetBucketInventoryConfigurationRequest>, IMarshaller<IRequest, Amazon.Runtime.AmazonWebServiceRequest>
{
public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input)
partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketInventoryConfigurationRequest publicRequest)
{
return this.Marshall((GetBucketInventoryConfigurationRequest)input);
}

public IRequest Marshall(GetBucketInventoryConfigurationRequest getInventoryConfigurationRequest)
{
IRequest request = new DefaultRequest(getInventoryConfigurationRequest, "Amazon.S3");

request.Suppress404Exceptions = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this Suppress404Exceptions in the generated marshaller. Is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nope that wasn't intentional, i just missed adding it. I'll add it here!

request.HttpMethod = "GET";

if (getInventoryConfigurationRequest.IsSetExpectedBucketOwner())
request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(getInventoryConfigurationRequest.ExpectedBucketOwner));

if (string.IsNullOrEmpty(getInventoryConfigurationRequest.BucketName))
throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketInventoryConfigurationRequest.BucketName");

request.ResourcePath = "/";
request.AddSubResource("inventory");
request.AddSubResource("id", getInventoryConfigurationRequest.InventoryId);
request.UseQueryString = true;

return request;
}

private static GetBucketInventoryConfigurationRequestMarshaller _instance;

/// <summary>
/// Singleton for marshaller
/// </summary>
public static GetBucketInventoryConfigurationRequestMarshaller Instance
{
get
{
if (_instance == null)
{
_instance = new GetBucketInventoryConfigurationRequestMarshaller();
}
return _instance;
}
defaultRequest.Suppress404Exceptions = true;
}
}
}

This file was deleted.

Loading