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 SummaryConstructors Constructor Description ContextIndex(Model model)
 - 
Method SummaryAll 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<OperationContextParamsTrait>getOperationContextParams(Shape operation)Gets the operation context parameter names and theirOperationContextParamDefinitionfor the given 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- 
ContextIndexpublic ContextIndex(Model model) 
 
- 
 - 
Method Detail- 
ofpublic static ContextIndex of(Model model) 
 - 
getClientContextParamspublic 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.
 
 - 
getStaticContextParamspublic 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.
 
 - 
getOperationContextParamspublic java.util.Optional<OperationContextParamsTrait> getOperationContextParams(Shape operation) Gets the operation context parameter names and theirOperationContextParamDefinitionfor the given operation.- Parameters:
- operation- The operation shape.
- Returns:
- The mapping of context parameter names to the JMESPath expression to bind to input elements.
 
 - 
getContextParamspublic 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.
 
 
- 
 
-