Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion 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 Down
10 changes: 10 additions & 0 deletions generator/ServiceModels/s3/s3.customizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,16 @@
"Format":{"emitPropertyName":"InventoryFormat"}
}
]
},
"GetBucketInventoryConfigurationRequest":{
"modify":[
{
"Id":{"emitPropertyName":"InventoryId"}
},
{
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
}
]
}

},
Expand Down
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.

This file was deleted.

Loading