Enum Class RelationshipType

java.lang.Object
java.lang.Enum<RelationshipType>
software.amazon.smithy.model.neighbor.RelationshipType
All Implemented Interfaces:
Serializable, Comparable<RelationshipType>, Constable

public enum RelationshipType extends Enum<RelationshipType>
Defines the relationship types between neighboring shapes.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A BINDING relationship exists between the following shapes: Between an operation and the service or resource that the operation is bound to (through operations or a lifecycle). Between a resource and the resource or service that the resource is bound to in the "resources" property. The subject of the relationship is that shape that was bound, and the target is the shape that declared the binding.
    A collection operation relationship exists between a resource and the operations bound to the resource in the "collectionOperations", "create", and "list" properties.
    Relationships that exist between a resource and the create lifecycle operation.
    Relationships that exist between a resource and the delete lifecycle operation.
    Relationships that exist on enum shapes to their member shapes.
    Relationships that exist on operation shapes.
    Relationships that exist between a member and the shapes that are referenced by its identifiers property.
    Relationships that exist on operation shapes.
    An instance operation relationship exists between a resource and the operations bound to the resource in the "Operations", "put", "read", "update", and "delete" properties.
    Relationships that exist on intEnum shapes to their member shapes.
    Relationships that exist between a resource and the list lifecycle operation.
    Relationships that exist on list shapes to their member shapes.
    Relationships that exist on map shapes.
    Relationships that exist on map shapes.
    Relationships exist on member shapes.
    Relationships exist on member shapes.
    Relationship that exists between a structure or union and a mixin applied to the shape.
    An operation relationship exists between a service and the operations bound to the service in the "operations" property, and between a resource and the operations bound to the resource in the "operations", "collectionOperations", and lifecycle properties.
    Relationships that exist on operation shapes.
    Relationships that exist between a member and the shapes that are referenced by its properties property.
    Relationships that exist between a resource and the put lifecycle operation.
    Relationships that exist between a resource and the get lifecycle operation.
    A resource relationship exists between a service or resource and the resources bound through the "resources" property.
    Deprecated.
    Relationships that exist on structure shapes.
    Relationships that exist between a shape and traits bound to the shape.
    Relationships that exist on union shapes.
    Relationships that exist between a resource and the update lifecycle operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the direction of the relationship.
    Gets the token that is used in Selector expressions when referring to the relationship or an empty Optional if this relationship is not used directly in a selector.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • RESOURCE

      public static final RelationshipType RESOURCE
      A resource relationship exists between a service or resource and the resources bound through the "resources" property.
    • OPERATION

      public static final RelationshipType OPERATION
      An operation relationship exists between a service and the operations bound to the service in the "operations" property, and between a resource and the operations bound to the resource in the "operations", "collectionOperations", and lifecycle properties.
    • COLLECTION_OPERATION

      public static final RelationshipType COLLECTION_OPERATION
      A collection operation relationship exists between a resource and the operations bound to the resource in the "collectionOperations", "create", and "list" properties.
    • INSTANCE_OPERATION

      public static final RelationshipType INSTANCE_OPERATION
      An instance operation relationship exists between a resource and the operations bound to the resource in the "Operations", "put", "read", "update", and "delete" properties.
    • BOUND

      public static final RelationshipType BOUND
      A BINDING relationship exists between the following shapes:
      • Between an operation and the service or resource that the operation is bound to (through operations or a lifecycle).
      • Between a resource and the resource or service that the resource is bound to in the "resources" property.
      The subject of the relationship is that shape that was bound, and the target is the shape that declared the binding.
    • PUT

      public static final RelationshipType PUT
      Relationships that exist between a resource and the put lifecycle operation.
    • CREATE

      public static final RelationshipType CREATE
      Relationships that exist between a resource and the create lifecycle operation.
    • READ

      public static final RelationshipType READ
      Relationships that exist between a resource and the get lifecycle operation.
    • UPDATE

      public static final RelationshipType UPDATE
      Relationships that exist between a resource and the update lifecycle operation.
    • DELETE

      public static final RelationshipType DELETE
      Relationships that exist between a resource and the delete lifecycle operation.
    • LIST

      public static final RelationshipType LIST
      Relationships that exist between a resource and the list lifecycle operation.
    • IDENTIFIER

      public static final RelationshipType IDENTIFIER
      Relationships that exist between a member and the shapes that are referenced by its identifiers property.
    • PROPERTY

      public static final RelationshipType PROPERTY
      Relationships that exist between a member and the shapes that are referenced by its properties property.
    • MEMBER_CONTAINER

      public static final RelationshipType MEMBER_CONTAINER
      Relationships exist on member shapes. The subject of the relationship is the member shape, and the neighbor is the aggregate shape that contains the member.
    • MEMBER_TARGET

      public static final RelationshipType MEMBER_TARGET
      Relationships exist on member shapes. The subject of the relationship is the member shape, and the neighbor is the shape that the member targets.
    • INPUT

      public static final RelationshipType INPUT
      Relationships that exist on operation shapes. They reference structure shapes that are used as input.
    • OUTPUT

      public static final RelationshipType OUTPUT
      Relationships that exist on operation shapes. They reference structure shapes that are used as output.
    • ERROR

      public static final RelationshipType ERROR
      Relationships that exist on operation shapes. They reference structure shapes that can be returned from the operation.
    • ENUM_MEMBER

      public static final RelationshipType ENUM_MEMBER
      Relationships that exist on enum shapes to their member shapes.
    • INT_ENUM_MEMBER

      public static final RelationshipType INT_ENUM_MEMBER
      Relationships that exist on intEnum shapes to their member shapes.
    • LIST_MEMBER

      public static final RelationshipType LIST_MEMBER
      Relationships that exist on list shapes to their member shapes.
    • SET_MEMBER

      @Deprecated public static final RelationshipType SET_MEMBER
      Deprecated.
      Relationships that exist on set shapes to their member shapes.
    • MAP_KEY

      public static final RelationshipType MAP_KEY
      Relationships that exist on map shapes. They reference member shapes that define the key type for the map.
    • MAP_VALUE

      public static final RelationshipType MAP_VALUE
      Relationships that exist on map shapes. They reference member shapes that define the value type for the map.
    • STRUCTURE_MEMBER

      public static final RelationshipType STRUCTURE_MEMBER
      Relationships that exist on structure shapes. They reference member shapes that define the attributes of a structure.
    • UNION_MEMBER

      public static final RelationshipType UNION_MEMBER
      Relationships that exist on union shapes. They reference the member shapes that define the members of the union.
    • TRAIT

      public static final RelationshipType TRAIT
      Relationships that exist between a shape and traits bound to the shape. They reference shapes marked with the TraitDefinition trait.

      This kind of relationship is not returned by default from a NeighborProvider. You must explicitly wrap a NeighborProvider with NeighborProvider.withTraitRelationships(Model, NeighborProvider) in order to yield trait relationships.

    • MIXIN

      public static final RelationshipType MIXIN
      Relationship that exists between a structure or union and a mixin applied to the shape.
  • Method Details

    • values

      public static RelationshipType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RelationshipType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSelectorLabel

      public Optional<String> getSelectorLabel()
      Gets the token that is used in Selector expressions when referring to the relationship or an empty Optional if this relationship is not used directly in a selector.
      Returns:
      Returns the optionally present selector token for this relationship.
    • getDirection

      public RelationshipDirection getDirection()
      Gets the direction of the relationship.

      A RelationshipDirection.DIRECTED direction is formed from a shape that defines a reference to another shape (for example, when a resource defines operations or resources it contains).

      A RelationshipDirection.INVERTED relationship is a relationship from a shape to a shape that defines a relationship to it. The target of such a relationship doesn't define the relationship, but is the target of the relationship.

      Returns:
      Returns the direction of the relationship.