Class PropertyBindingIndex
java.lang.Object
software.amazon.smithy.model.knowledge.PropertyBindingIndex
- All Implemented Interfaces:
KnowledgeIndex
Index of member shape to associated resource property information.
-
Method Summary
Modifier and TypeMethodDescriptionbooleandoesMemberShapeRequireProperty(MemberShape memberShape) Returns true if member is required to have an associated property mapping.getInputPropertiesShape(OperationShape operation) Resolves and returns the input shape of an operation that contains the top-level resource bound properties.getOutputPropertiesShape(OperationShape operation) Resolves and returns the output shape of an operation that contains the top-level resource bound properties.getPropertyName(ShapeId memberShapeId) Gets the property name for a given member shape.booleanisMemberShapeProperty(MemberShape memberShape) Returns true if a member shape positively maps to a property.static PropertyBindingIndex
-
Method Details
-
of
-
getPropertyName
Gets the property name for a given member shape. Returns empty optional if the member shape does not correspond to a property.- Parameters:
memberShapeId- the ShapeId of the member shape to get the property name for.- Returns:
- the property name for a given member shape if there is one.
-
isMemberShapeProperty
Returns true if a member shape positively maps to a property. will return a non-empty Optional if this method returns true.- Parameters:
memberShape- the member shape to check- Returns:
- true if member shape maps to a property on the given resource
-
getOutputPropertiesShape
Resolves and returns the output shape of an operation that contains the top-level resource bound properties. Handles adjustments made with- Parameters:
operation- operation to retrieve output properties shape for.- Returns:
- the output shape of an operation that contains top-level resource properties.
-
getInputPropertiesShape
Resolves and returns the input shape of an operation that contains the top-level resource bound properties. Handles adjustments made with- Parameters:
operation- operation to retrieve output properties shape for- Returns:
- the input shape of an operation that contains top-level resource properties.
-
doesMemberShapeRequireProperty
Returns true if member is required to have an associated property mapping.- Parameters:
memberShape- the member shape to check- Returns:
- True if input/output member is required to have a property mapping.
-