Class ContextIndex
- java.lang.Object
-
- software.amazon.smithy.rulesengine.traits.ContextIndex
-
- All Implemented Interfaces:
KnowledgeIndex
public final class ContextIndex extends java.lang.Object implements KnowledgeIndex
Resolves an indexes the context parameters in the model.
-
-
Constructor Summary
Constructors Constructor Description ContextIndex(Model model)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<ClientContextParamsTrait>getClientContextParams(Shape service)Gets the mapping of context parameter names and correspondingClientContextParamDefinitionto be generated on the service client's configuration.java.util.Map<MemberShape,ContextParamTrait>getContextParams(Shape operation)Gets the mapping ofMemberShapetoContextParamTraitfor the operation.java.util.Optional<StaticContextParamsTrait>getStaticContextParams(Shape operation)Gets the static context parameter names and theirStaticContextParamDefinitionto be set for the given operation.static ContextIndexof(Model model)
-
-
-
Constructor Detail
-
ContextIndex
public ContextIndex(Model model)
-
-
Method Detail
-
of
public static ContextIndex of(Model model)
-
getClientContextParams
public java.util.Optional<ClientContextParamsTrait> getClientContextParams(Shape service)
Gets the mapping of context parameter names and correspondingClientContextParamDefinitionto be generated on the service client's configuration.- Parameters:
service- The service shape.- Returns:
- The mapping of context parameter names to
ClientContextParamDefinition.
-
getStaticContextParams
public java.util.Optional<StaticContextParamsTrait> getStaticContextParams(Shape operation)
Gets the static context parameter names and theirStaticContextParamDefinitionto be set for the given operation.- Parameters:
operation- The operation shape.- Returns:
- The mapping of context parameter names to the static
Nodevalue to be set.
-
getContextParams
public java.util.Map<MemberShape,ContextParamTrait> getContextParams(Shape operation)
Gets the mapping ofMemberShapetoContextParamTraitfor the operation.- Parameters:
operation- The operation shape.- Returns:
- The mapping of operation's
MemberShapetoContextParamTrait.
-
-