|
16 | 16 | package software.amazon.smithy.aws.typescript.codegen;
|
17 | 17 |
|
18 | 18 | import java.util.Collections;
|
| 19 | +import java.util.HashMap; |
19 | 20 | import java.util.List;
|
20 | 21 | import java.util.Map;
|
21 | 22 | import java.util.function.Consumer;
|
@@ -68,21 +69,29 @@ public List<RuntimeClientPlugin> getClientPlugins() {
|
68 | 69 | .withConventions(AwsDependency.MIDDLEWARE_ENDPOINT_DISCOVERY.dependency,
|
69 | 70 | "EndpointDiscovery", RuntimeClientPlugin.Convention.HAS_CONFIG)
|
70 | 71 | // ToDo: The Endpoint Discovery Command Name needs to be read from ClientEndpointDiscoveryTrait.
|
71 |
| - .additionalResolveFunctionParameters("DescribeEndpointsCommand") |
| 72 | + .resolveFunctionParamsSupplier((m, s, o) -> new HashMap<String, Object>() {{ |
| 73 | + put("DescribeEndpointsCommand", "DescribeEndpointsCommand"); |
| 74 | + }}) |
72 | 75 | .servicePredicate((m, s) -> hasClientEndpointDiscovery(s))
|
73 | 76 | .build(),
|
74 | 77 | // ToDo: The value ClientDiscoveredEndpointTrait.isRequired() needs to be passed to Plugin instead
|
75 | 78 | // of creating two functions Required and Optional. The map of identifiers also needs to be passed.
|
76 | 79 | RuntimeClientPlugin.builder()
|
77 | 80 | .withConventions(AwsDependency.MIDDLEWARE_ENDPOINT_DISCOVERY.dependency,
|
78 | 81 | "EndpointDiscoveryRequired", RuntimeClientPlugin.Convention.HAS_MIDDLEWARE)
|
79 |
| - .additionalPluginFunctionParameters(new String[]{"clientStack", "options"}) |
| 82 | + .pluginFunctionParamsSupplier((m, s, o) -> new HashMap<String, Object>() {{ |
| 83 | + put("clientStack", "clientStack"); |
| 84 | + put("options", "options"); |
| 85 | + }}) |
80 | 86 | .operationPredicate((m, s, o) -> isClientDiscoveredEndpointRequired(s, o))
|
81 | 87 | .build(),
|
82 | 88 | RuntimeClientPlugin.builder()
|
83 | 89 | .withConventions(AwsDependency.MIDDLEWARE_ENDPOINT_DISCOVERY.dependency,
|
84 | 90 | "EndpointDiscoveryOptional", RuntimeClientPlugin.Convention.HAS_MIDDLEWARE)
|
85 |
| - .additionalPluginFunctionParameters(new String[]{"clientStack", "options"}) |
| 91 | + .pluginFunctionParamsSupplier((m, s, o) -> new HashMap<String, Object>() {{ |
| 92 | + put("clientStack", "clientStack"); |
| 93 | + put("options", "options"); |
| 94 | + }}) |
86 | 95 | .operationPredicate((m, s, o) -> isClientDiscoveredEndpointOptional(s, o))
|
87 | 96 | .build()
|
88 | 97 | );
|
|
0 commit comments