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
11 changes: 11 additions & 0 deletions generator/.DevConfigs/0c5568ff-1b20-4cd6-a5cf-2e676424569a.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"services": [
{
"serviceName": "S3",
"type": "patch",
"changeLogMessages": [
"Generate 4 more S3 operations"
]
}
]
}
9 changes: 7 additions & 2 deletions generator/ServiceClientGeneratorLib/GeneratorDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1719,8 +1719,13 @@ private void S3NeedsCustomUpdate(Shape shape)
// a dictionary of shape name to number of members that shape has
var customUpdateShapes = new Dictionary<string, int>
{
{"LifecycleFilter", 5 },
{"MetricsFilter", 4 }
{ "LifecycleFilter", 5 },
{ "MetricsFilter", 4 },
{ "AnalyticsFilter", 3 },
{ "IntelligentTieringFilter", 3 },
{ "MetricsAndOperator", 3 },
{ "AnalyticsAndOperator", 2 },
{ "IntelligentTieringAndOperator", 2}
};
if (customUpdateShapes.TryGetValue(shape.Name, out int membersCount))
Copy link
Member

Choose a reason for hiding this comment

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

Why we are only checking the membersCount? What if the docs changed or the changed something with the validation and made them more open?
I know this isn't part of this PR and I'm not sure if I reviewed the first PR and missed it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm that is a good point, a doc change wouldn't trigger this validation. This is a short-term solution though. Longer term we need a trebuchet validator.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am ok which this only until the customization flag is no longer automatically set on the feature for the reason you stated where we don't want to have validation failures. Please add a task to add the validator to the S3 project.

{
Expand Down
8 changes: 4 additions & 4 deletions generator/ServiceClientGeneratorLib/ServiceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -549,26 +549,26 @@ public List<Operation> S3AllowListOperations
// phase 3 (including those moved from phase 1)
new Operation(this, "CreateSession", DocumentRoot[OperationsKey]["CreateSession"]),
new Operation(this, "GetBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["GetBucketAnalyticsConfiguration"]),
//new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]),
new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]),
//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"]),
//new Operation(this, "GetBucketWebsite", DocumentRoot[OperationsKey]["GetBucketWebsite"]),
new Operation(this, "ListBucketAnalyticsConfigurations", DocumentRoot[OperationsKey]["ListBucketAnalyticsConfigurations"]),
//new Operation(this, "ListBucketIntelligentTieringConfigurations", DocumentRoot[OperationsKey]["ListBucketIntelligentTieringConfigurations"]),
new Operation(this, "ListBucketIntelligentTieringConfigurations", DocumentRoot[OperationsKey]["ListBucketIntelligentTieringConfigurations"]),
//new Operation(this, "ListBucketInventoryConfigurations", DocumentRoot[OperationsKey]["ListBucketInventoryConfigurations"]),
new Operation(this, "ListBucketMetricsConfigurations", DocumentRoot[OperationsKey]["ListBucketMetricsConfigurations"]),
//new Operation(this, "PutBucketAccelerateConfiguration", DocumentRoot[OperationsKey]["PutBucketAccelerateConfiguration"]),
//new Operation(this, "RestoreObject", DocumentRoot[OperationsKey]["RestoreObject"]),
//new Operation(this, "SelectObjectContent", DocumentRoot[OperationsKey]["SelectObjectContent"]),
new Operation(this, "PutBucketAnalyticsConfiguration" , DocumentRoot[OperationsKey]["PutBucketAnalyticsConfiguration"]),
//new Operation(this, "PutBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["PutBucketIntelligentTieringConfiguration"]),
new Operation(this, "PutBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["PutBucketIntelligentTieringConfiguration"]),
//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"]),
//new Operation(this, "DeleteBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["DeleteBucketIntelligentTieringConfiguration"]),
new Operation(this, "DeleteBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["DeleteBucketIntelligentTieringConfiguration"]),
//new Operation(this, "DeleteBucketInventoryConfiguration", DocumentRoot[OperationsKey]["DeleteBucketInventoryConfiguration"]),

};
Expand Down
73 changes: 72 additions & 1 deletion generator/ServiceModels/s3/s3.customizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,75 @@
]}
}
]
},
"PutBucketIntelligentTieringConfigurationRequest" : {
"modify" : [
{
"Id": {"emitPropertyName": "IntelligentTieringId"}
}
]
},
"IntelligentTieringConfiguration" : {
"modify": [
{
"Id" :{"emitPropertyName":"IntelligentTieringId"}
},
{
"Filter": {"emitPropertyName": "IntelligentTieringFilter"}
},
{
"IntelligentTieringFilter" :{
"injectXmlMarshallCode": ["IntelligentTieringFilterCustomMarshall(publicRequest, xmlWriter);"]
}
}
],
"predicateListUnmarshallers": [
{
"IntelligentTieringFilter" :{
"predicateListUnmarshallerName" : "IntelligentTieringPredicateListFilterUnmarshaller",
"filterPredicateName": "IntelligentTieringFilterPredicate"
}
}
]
},
"GetBucketIntelligentTieringConfigurationRequest":{
"modify":[
{
"Id" : {"emitPropertyName": "IntelligentTieringId"}
}
]
},
"ListBucketIntelligentTieringConfigurationsRequest":{
"modify":[
{
"ContinuationToken":{
"injectXmlIsSet":[
"return !string.IsNullOrEmpty(this._continuationToken);"
]
}
}
]
},
"ListBucketIntelligentTieringConfigurationsOutput":{
"modify":[
{
"ContinuationToken":{
"injectXmlIsSet":[ "return !string.IsNullOrEmpty(this._continuationToken);"]
}
},
{
"NextContinuationToken":{
"injectXmlIsSet":["return !string.IsNullOrEmpty(this._nextContinuationToken);"]
}
}
]
},
"DeleteBucketIntelligentTieringConfigurationRequest":{
"modify":[
{
"Id":{"emitPropertyName": "IntelligentTieringId"}
}
]
}
},
"operationModifiers": {
Expand Down Expand Up @@ -1381,6 +1450,8 @@
"MetricsFilter",
"MetricsAndOperator",
"AnalyticsFilter",
"AnalyticsAndOperator"
"AnalyticsAndOperator",
"IntelligentTieringFilter",
"IntelligentTieringAndOperator"
]
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading