-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rollout generated waiters for ec2 (#2717)
- Loading branch information
Showing
29 changed files
with
876 additions
and
1,149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"id": "3862dfed-da7e-4cf9-b859-3de8ac95a77e", | ||
"type": "feature", | ||
"description": "Switch to new waiter matching implementation, which conveys a slight performance boost and removes the need for the go-jmespath runtime dependency.", | ||
"modules": [ | ||
"service/ec2" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...odegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AwsWaiters2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package software.amazon.smithy.aws.go.codegen.customization; | ||
|
||
import software.amazon.smithy.codegen.core.Symbol; | ||
import software.amazon.smithy.go.codegen.integration.Waiters2; | ||
import software.amazon.smithy.model.Model; | ||
import software.amazon.smithy.model.shapes.ShapeId; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import static software.amazon.smithy.go.codegen.SymbolUtils.buildPackageSymbol; | ||
|
||
public class AwsWaiters2 extends Waiters2 { | ||
public static final List<ShapeId> PHASED_ROLLOUT_SERVICES = List.of( | ||
ShapeId.from("com.amazonaws.ec2#AmazonEC2") | ||
); | ||
|
||
@Override | ||
public Set<Symbol> getAdditionalClientOptions() { | ||
return Set.of(buildPackageSymbol("addIsWaiterUserAgent")); | ||
} | ||
|
||
@Override | ||
public boolean enabledForService(Model model, ShapeId service) { | ||
return PHASED_ROLLOUT_SERVICES.contains(service); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...n/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.