Class IdentifierBindingIndex
java.lang.Object
software.amazon.smithy.model.knowledge.IdentifierBindingIndex
- All Implemented Interfaces:
KnowledgeIndex
Index of operation shapes to the identifiers bound to the operation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOperationBindings(ToShapeId resource, ToShapeId operation) Deprecated.getOperationBindingType(ToShapeId resource, ToShapeId operation) Gets the identifier binding type of an operation to a resource.getOperationInputBindings(ToShapeId resource, ToShapeId operation) Gets a map of identifier names to input member names that provide a value for that identifier.getOperationInputElementBindings(ToShapeId resource, ToShapeId operation) Gets a map of identifier names to member names of the element structure of a collection operation's input list that provide a value for that identifier, resolved through the input member marked with the@nestedPropertiestrait.getOperationOutputBindings(ToShapeId resource, ToShapeId operation) Gets a map of identifier names to output member names that provide a value for that identifier.getOperationOutputElementBindings(ToShapeId resource, ToShapeId operation) Gets a map of identifier names to member names of the element structure of a collection operation's output list that provide a value for that identifier.static IdentifierBindingIndex
-
Constructor Details
-
IdentifierBindingIndex
-
-
Method Details
-
of
-
getOperationBindingType
public IdentifierBindingIndex.BindingType getOperationBindingType(ToShapeId resource, ToShapeId operation) Gets the identifier binding type of an operation to a resource.The NONE Binding type is returned if the resource can't be found, the operation can't be found, or if the operation is not bound to the resource.
- Parameters:
resource- Shape ID of a resource.operation- Shape ID of an operation.- Returns:
- Returns the binding type of the operation.
-
getOperationInputBindings
Gets a map of identifier names to input member names that provide a value for that identifier.- Parameters:
resource- Shape ID of a resource.operation- Shape ID of an operation.- Returns:
- Returns the identifier bindings map or an empty map if the binding is invalid or cannot be found.
-
getOperationOutputBindings
Gets a map of identifier names to output member names that provide a value for that identifier.- Parameters:
resource- Shape ID of a resource.operation- Shape ID of an operation.- Returns:
- Returns the identifier bindings map or an empty map if the binding is invalid or cannot be found.
-
getOperationInputElementBindings
Gets a map of identifier names to member names of the element structure of a collection operation's input list that provide a value for that identifier, resolved through the input member marked with the@nestedPropertiestrait.- Parameters:
resource- Shape ID of a resource.operation- Shape ID of an operation.- Returns:
- Returns the identifier bindings map of the input list element or an empty map.
-
getOperationOutputElementBindings
public Map<String,String> getOperationOutputElementBindings(ToShapeId resource, ToShapeId operation) Gets a map of identifier names to member names of the element structure of a collection operation's output list that provide a value for that identifier.The element structure is resolved through the output member marked with the
@nestedPropertiestrait targeting a list of structures, or, for thelistlifecycle without that trait, through a single unambiguous list-of-structures output member. An empty map is returned when the operation is not bound as a collection operation, when the carrying list member cannot be resolved, or when the binding cannot be found.- Parameters:
resource- Shape ID of a resource.operation- Shape ID of an operation.- Returns:
- Returns the identifier bindings map of the output list element or an empty map.
-
getOperationBindings
Deprecated.Gets a map of identifier names to input member names that provide a value for that identifier.- Parameters:
resource- Shape ID of a resource.operation- Shape ID of an operation.- Returns:
- Returns the identifier bindings map or an empty map if the binding is invalid or cannot be found.
-
getOperationInputBindings(software.amazon.smithy.model.shapes.ToShapeId, software.amazon.smithy.model.shapes.ToShapeId)instead.