Skip to content

Commit

Permalink
chore(codegen): formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
siddsriv committed Oct 4, 2024
1 parent d64e995 commit f95a1d3
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public void addConfigInterfaceFields(
) {
if (isAwsService(settings, model)) {
ServiceShape service = settings.getService(model);
if(hasAccountIdEndpointParam(service)) {
if (hasAccountIdEndpointParam(service)) {
writer.addImportSubmodule("AccountIdEndpointMode", null,
AwsDependency.AWS_SDK_CORE, "/account-id-endpoint");
writer.writeDocs("Defines if the AWS AccountId will be used for endpoint routing.");
writer.write("accountIdEndpointMode?: AccountIdEndpointMode | " +
"__Provider<AccountIdEndpointMode>;\n");
writer.write("accountIdEndpointMode?: AccountIdEndpointMode | "
+ "__Provider<AccountIdEndpointMode>;\n");
writer.addImportSubmodule("resolveAccountIdEndpointModeConfig", null,
AwsDependency.AWS_SDK_CORE, "/account-id-endpoint");
}
Expand Down Expand Up @@ -137,13 +137,13 @@ public List<RuntimeClientPlugin> getClientPlugins() {
}

private boolean hasAccountIdEndpointParam(ServiceShape service) {
Optional<EndpointRuleSetTrait> endpointRuleSetTrait = service.getTrait(EndpointRuleSetTrait.class);
if (endpointRuleSetTrait.isPresent()) {
RuleSetParameterFinder ruleSetParameterFinder = new RuleSetParameterFinder(service);
if (ruleSetParameterFinder.getBuiltInParams().containsKey("AccountIdEndpointMode")) {
return true;
Optional<EndpointRuleSetTrait> endpointRuleSetTrait = service.getTrait(EndpointRuleSetTrait.class);
if (endpointRuleSetTrait.isPresent()) {
RuleSetParameterFinder ruleSetParameterFinder = new RuleSetParameterFinder(service);
if (ruleSetParameterFinder.getBuiltInParams().containsKey("AccountIdEndpointMode")) {
return true;
}
}
}
return false;
return false;
}
}

0 comments on commit f95a1d3

Please sign in to comment.