Class PropertyBindingIndex
- java.lang.Object
- 
- software.amazon.smithy.model.knowledge.PropertyBindingIndex
 
- 
- All Implemented Interfaces:
- KnowledgeIndex
 
 public final class PropertyBindingIndex extends java.lang.Object implements KnowledgeIndex Index of member shape to associated resource property information.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandoesMemberShapeRequireProperty(MemberShape memberShape)Returns true if member is required to have an associated property mapping.StructureShapegetInputPropertiesShape(OperationShape operation)Resolves and returns the input shape of an operation that contains the top-level resource bound properties.StructureShapegetOutputPropertiesShape(OperationShape operation)Resolves and returns the output shape of an operation that contains the top-level resource bound properties.java.util.Optional<java.lang.String>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 PropertyBindingIndexof(Model model)
 
- 
- 
- 
Method Detail- 
ofpublic static PropertyBindingIndex of(Model model) 
 - 
getPropertyNamepublic java.util.Optional<java.lang.String> getPropertyName(ShapeId memberShapeId) 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.
 
 - 
isMemberShapePropertypublic boolean isMemberShapeProperty(MemberShape memberShape) Returns true if a member shape positively maps to a property. {@see PropertyBindingIndex#getPropertyName(ShapeId)} 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
 
 - 
getOutputPropertiesShapepublic StructureShape getOutputPropertiesShape(OperationShape operation) 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.
 
 - 
getInputPropertiesShapepublic StructureShape getInputPropertiesShape(OperationShape operation) 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.
 
 - 
doesMemberShapeRequirePropertypublic boolean doesMemberShapeRequireProperty(MemberShape memberShape) 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.
 
 
- 
 
-