diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters.java index c55139d1..8ab90de6 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters.java @@ -58,8 +58,16 @@ public Set getAdditionalClientOptions() { return emptySet(); } + public boolean enabledForService(Model model, ShapeId service) { + return true; + } + @Override public void writeAdditionalFiles(GoCodegenContext ctx) { + if (!enabledForService(ctx.model(), ctx.settings().getService())) { + return; + } + var service = ctx.settings().getService(ctx.model()); TopDownIndex.of(ctx.model()).getContainedOperations(service).stream() diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters2.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters2.java index 999350ad..eb6dc673 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters2.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/Waiters2.java @@ -57,8 +57,16 @@ public Set getAdditionalClientOptions() { return emptySet(); } + public boolean enabledForService(Model model, ShapeId service) { + return true; + } + @Override public void writeAdditionalFiles(GoCodegenContext ctx) { + if (!enabledForService(ctx.model(), ctx.settings().getService())) { + return; + } + var service = ctx.settings().getService(ctx.model()); TopDownIndex.of(ctx.model()).getContainedOperations(service).stream()