Skip to content

Commit

Permalink
Remove httpLabel trait from Bucket members (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaiahvita committed Jul 31, 2023
1 parent 7cb6d19 commit 5a56b8a
Show file tree
Hide file tree
Showing 163 changed files with 2,096 additions and 1,328 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package software.amazon.smithy.aws.go.codegen.customization;

import software.amazon.smithy.go.codegen.GoSettings;
import software.amazon.smithy.go.codegen.integration.GoIntegration;
import software.amazon.smithy.model.Model;
import software.amazon.smithy.model.traits.HttpLabelTrait;
import software.amazon.smithy.model.transform.ModelTransformer;

public class S3HttpLabelBucketFilterIntegration implements GoIntegration {

@Override
public Model preprocessModel(Model model, GoSettings settings) {
if (!S3ModelUtils.isServiceS3(model, settings.getService(model))) {
return model;
}

return ModelTransformer.create().removeTraitsIf(model, (shape, trait) -> {
if (trait instanceof HttpLabelTrait) {
return shape.asMemberShape()
.map(s -> s.getMemberName().equals("Bucket"))
.orElse(false);
}
return false;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,6 @@ public void processFinalizedModel(GoSettings settings, Model model) {
symbolProvider.toSymbol(operation).getName(),
UPDATE_ENDPOINT_INTERNAL_ADDER
);

runtimeClientPlugins.add(RuntimeClientPlugin.builder()
.operationPredicate((m, s, o) -> {
if (!isS3SharedService(m, s)) {
return false;
}
return o.equals(operation);
})
.registerMiddleware(MiddlewareRegistrar.builder()
.resolvedFunction(SymbolUtils.createValueSymbolBuilder(helperFuncName)
.build())
.useClientOptions()
.build())
.build());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ software.amazon.smithy.aws.go.codegen.AwsEndpointResolverBuiltInGenerator
software.amazon.smithy.aws.go.codegen.customization.S3ControlHostPrefixAccountIdFilterIntegration
software.amazon.smithy.aws.go.codegen.customization.S3HttpPathBucketFilterIntegration
software.amazon.smithy.aws.go.codegen.customization.S3HostPrefixRequestRouteFilterIntegration
software.amazon.smithy.aws.go.codegen.customization.S3HttpLabelBucketFilterIntegration
software.amazon.smithy.aws.go.codegen.AwsEndpointAuthSchemeGenerator
3 changes: 0 additions & 3 deletions service/s3/api_op_AbortMultipartUpload.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_CompleteMultipartUpload.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_CopyObject.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_CreateBucket.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_CreateMultipartUpload.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucket.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketAnalyticsConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketCors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketEncryption.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketInventoryConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketLifecycle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketMetricsConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketOwnershipControls.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketPolicy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketReplication.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketTagging.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteBucketWebsite.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteObject.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteObjectTagging.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeleteObjects.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_DeletePublicAccessBlock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketAccelerateConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketAcl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketAnalyticsConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketCors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketEncryption.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketIntelligentTieringConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketInventoryConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketLifecycleConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketLocation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketLogging.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketMetricsConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions service/s3/api_op_GetBucketNotificationConfiguration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a56b8a

Please sign in to comment.