File tree Expand file tree Collapse file tree 1 file changed +2
-25
lines changed
smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/endpointsV2 Expand file tree Collapse file tree 1 file changed +2
-25
lines changed Original file line number Diff line number Diff line change 3030import software .amazon .smithy .rulesengine .traits .ContextParamTrait ;
3131import software .amazon .smithy .rulesengine .traits .EndpointRuleSetTrait ;
3232import software .amazon .smithy .rulesengine .traits .StaticContextParamsTrait ;
33+ import software .amazon .smithy .utils .SmithyInternalApi ;
3334
35+ @ SmithyInternalApi
3436public class RuleSetParameterFinder {
3537 private final ServiceShape service ;
3638 private final EndpointRuleSetTrait ruleset ;
@@ -73,31 +75,6 @@ public Map<String, String> getClientContextParams() {
7375 return map ;
7476 }
7577
76- /**
77- * "The staticContextParams trait defines one or more context parameters that MUST
78- * be bound to the specified values. This trait MUST target an operation shape."
79- */
80- public Map <String , String > getStaticContextParams (Shape operationInput ) {
81- Map <String , String > map = new HashMap <>();
82-
83- if (operationInput .isStructureShape ()) {
84- operationInput .getAllMembers ().forEach ((String memberName , MemberShape member ) -> {
85- Optional <StaticContextParamsTrait > trait = member .getTrait (StaticContextParamsTrait .class );
86- if (trait .isPresent ()) {
87- StaticContextParamsTrait staticContextParamsTrait = trait .get ();
88- staticContextParamsTrait .getParameters ().forEach ((name , definition ) -> {
89- map .put (
90- name ,
91- definition .getValue ().getType ().toString ()
92- );
93- });
94- }
95- });
96- }
97-
98- return map ;
99- }
100-
10178 /**
10279 * Get map of params to actual values instead of the value type.
10380 */
You can’t perform that action at this time.
0 commit comments